-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev-start.bat
More file actions
58 lines (50 loc) · 1.47 KB
/
Copy pathdev-start.bat
File metadata and controls
58 lines (50 loc) · 1.47 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
@echo off
REM VSP MVP Development Startup Script for Windows
REM This script starts both backend and frontend in development mode
echo Starting VSP Chatbot Development Environment...
REM Check if .env exists
if not exist .env (
echo Error: .env file not found!
echo Please copy env.example to .env and add your OpenAI API key
pause
exit /b 1
)
REM Check if frontend\.env.local exists
if not exist frontend\.env.local (
echo Creating frontend\.env.local...
echo NEXT_PUBLIC_API_URL=http://localhost:8000 > frontend\.env.local
)
REM Start Backend
echo Starting Backend (FastAPI)...
cd backend
if not exist venv (
echo Creating Python virtual environment...
python -m venv venv
call venv\Scripts\activate
pip install -r requirements.txt
) else (
call venv\Scripts\activate
)
cd ..
start "VSP Backend" cmd /k python -m uvicorn backend.main:app --reload --port 8000
REM Wait for backend to start
timeout /t 3 /nobreak > nul
REM Start Frontend
echo Starting Frontend (Next.js)...
cd frontend
if not exist node_modules (
echo Installing npm dependencies...
call npm install
)
start "VSP Frontend" cmd /k npm run dev
echo.
echo ==================================
echo VSP Chatbot is starting!
echo ==================================
echo Frontend: http://localhost:3000
echo Backend: http://localhost:8000
echo API Docs: http://localhost:8000/docs
echo ==================================
echo.
echo Close the terminal windows to stop the services
pause