-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
70 lines (64 loc) · 1.62 KB
/
setup.bat
File metadata and controls
70 lines (64 loc) · 1.62 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
@echo off
echo =============================================
echo Political Speech Analyzer - Setup Script
echo =============================================
echo.
REM Check if Node.js is installed
where node >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Node.js is not installed
echo Please install Node.js from https://nodejs.org/
echo Minimum version: 18.0.0
pause
exit /b 1
)
node --version
npm --version
echo.
REM Install dependencies
echo Installing dependencies...
echo This may take 2-3 minutes...
call npm install
if %ERRORLEVEL% EQU 0 (
echo.
echo [SUCCESS] Dependencies installed!
echo.
) else (
echo.
echo [ERROR] Failed to install dependencies
echo Please check the error messages above
pause
exit /b 1
)
REM Check if .env.local exists
if exist .env.local (
findstr "your_openai_api_key_here" .env.local >nul
if %ERRORLEVEL% EQU 0 (
echo [WARNING] Please add your OpenAI API key to .env.local
echo.
echo Steps:
echo 1. Open .env.local in Notepad
echo 2. Replace 'your_openai_api_key_here' with your actual API key
echo 3. Get your API key from: https://platform.openai.com/api-keys
echo.
) else (
echo [SUCCESS] OpenAI API key configured
echo.
)
) else (
echo [ERROR] .env.local file not found
pause
exit /b 1
)
echo =============================================
echo Setup Complete!
echo =============================================
echo.
echo To start the app, run:
echo npm run dev
echo.
echo Then open: http://localhost:3000
echo.
echo Need help? Read QUICKSTART.md
echo.
pause