-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_server.bat
More file actions
56 lines (49 loc) Β· 1.74 KB
/
start_server.bat
File metadata and controls
56 lines (49 loc) Β· 1.74 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
@echo off
REM Agentic Coder Server Startup Script for Windows
REM Starts the FastAPI server accessible from external machines
echo.
echo π Starting Agentic Coder Server...
echo.
REM Check if .env exists
if not exist .env (
echo β οΈ Warning: .env file not found
if exist .env.example (
echo Creating from .env.example...
copy .env.example .env >nul
echo β Created .env - Please edit it with your configuration
echo.
) else (
echo β Error: .env.example not found
exit /b 1
)
)
REM Check if virtual environment exists
if exist venv\Scripts\activate.bat (
echo π¦ Activating virtual environment...
call venv\Scripts\activate.bat
)
REM Install dependencies if needed
python -c "import fastapi" 2>nul
if errorlevel 1 (
echo π₯ Installing dependencies...
pip install -r requirements.txt
)
REM Get local IP address
for /f "tokens=2 delims=:" %%a in ('ipconfig ^| findstr /c:"IPv4"') do set LOCAL_IP=%%a
set LOCAL_IP=%LOCAL_IP: =%
echo.
echo β
Server Configuration:
echo - Local access: http://localhost:8000
echo - Network access: http://%LOCAL_IP%:8000
echo - API docs: http://localhost:8000/docs
echo - Health check: http://localhost:8000/health
echo.
echo π Server will be accessible from other machines on your network
echo Use this for remote client: %LOCAL_IP%:8000
echo.
echo Press Ctrl+C to stop the server
echo ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
echo.
REM Start server with external access enabled
cd backend
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload