-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
99 lines (91 loc) · 2.39 KB
/
setup.bat
File metadata and controls
99 lines (91 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@echo off
echo =============================================
echo CookMate - Automated Setup for Windows
echo =============================================
echo.
:: Check if Node.js is installed
where node >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Node.js is not installed or not in PATH
echo Please install Node.js from https://nodejs.org/
echo.
pause
exit /b 1
)
:: Check if npm is installed
where npm >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ERROR: npm is not installed or not in PATH
echo Please install Node.js from https://nodejs.org/
echo.
pause
exit /b 1
)
echo [1/6] Node.js and npm detected ✓
echo.
:: Install root dependencies
echo [2/6] Installing root dependencies...
npm install
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Failed to install root dependencies
pause
exit /b 1
)
echo Root dependencies installed ✓
echo.
:: Install backend dependencies
echo [3/6] Installing backend dependencies...
cd backend\functions
npm install
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Failed to install backend dependencies
pause
exit /b 1
)
echo Backend dependencies installed ✓
cd ..\..
echo.
:: Install frontend dependencies
echo [4/6] Installing frontend dependencies...
cd frontend
npm install
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Failed to install frontend dependencies
pause
exit /b 1
)
echo Frontend dependencies installed ✓
cd ..
echo.
:: Setup .env file
echo [5/6] Setting up environment file...
if not exist "backend\functions\.env" (
copy "backend\functions\.env.template" "backend\functions\.env"
echo Environment file created from template ✓
echo.
echo IMPORTANT: Edit backend\functions\.env and add your GROQ_API_KEY
echo Get your free API key from: https://console.groq.com/
echo.
) else (
echo Environment file already exists ✓
)
echo.
:: Final instructions
echo [6/6] Setup completed successfully! ✓
echo.
echo =============================================
echo NEXT STEPS:
echo =============================================
echo 1. Edit backend\functions\.env and add your GROQ_API_KEY
echo (Get free key: https://console.groq.com/)
echo.
echo 2. Start the development servers:
echo Run: npm run dev:backend
echo Run: npm run dev:frontend
echo.
echo 3. Open http://localhost:5173 in your browser
echo.
echo For more details, see README.md
echo =============================================
echo.
pause