-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
91 lines (73 loc) · 2.17 KB
/
start.bat
File metadata and controls
91 lines (73 loc) · 2.17 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
@echo off
REM Clinical ChatBot Startup Script for Windows
REM This script helps you start both backend and frontend servers
echo ==========================================
echo Clinical ChatBot Startup
echo ==========================================
echo.
REM Check if .env files exist
echo Checking configuration files...
if not exist "backend\.env" (
echo Warning: backend\.env not found!
echo Creating from .env.example...
copy backend\.env.example backend\.env
echo.
echo Please edit backend\.env with your API keys before continuing!
pause
exit /b 1
)
if not exist "frontend\.env.local" (
echo Warning: frontend\.env.local not found!
echo Creating from .env.local.example...
copy frontend\.env.local.example frontend\.env.local
)
echo Configuration files found
echo.
REM Start backend
echo Starting Backend Server...
cd backend
REM Check if virtual environment exists
if not exist "venv" (
echo Creating virtual environment...
python -m venv venv
)
REM Activate virtual environment and install dependencies
call venv\Scripts\activate.bat
if not exist "venv\.installed" (
echo Installing backend dependencies...
pip install -r requirements.txt
echo. > venv\.installed
)
REM Start backend server
echo Starting FastAPI server on http://localhost:8000
start "Clinical ChatBot - Backend" cmd /k "venv\Scripts\activate.bat && python -m app.main"
cd ..
echo Backend started
echo.
REM Wait a bit for backend to start
timeout /t 3 /nobreak >nul
REM Start frontend
echo Starting Frontend Server...
cd frontend
REM Install dependencies if needed
if not exist "node_modules" (
echo Installing frontend dependencies...
call npm install
)
REM Start frontend server
echo Starting Next.js server on http://localhost:3000
start "Clinical ChatBot - Frontend" cmd /k "npm run dev"
cd ..
echo Frontend started
echo.
echo ==========================================
echo Clinical ChatBot is running!
echo ==========================================
echo.
echo Backend: http://localhost:8000
echo Frontend: http://localhost:3000
echo API Docs: http://localhost:8000/api/docs
echo.
echo Close the server windows to stop the application
echo.
pause