-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrun_api.bat
More file actions
38 lines (33 loc) 路 1.08 KB
/
Copy pathrun_api.bat
File metadata and controls
38 lines (33 loc) 路 1.08 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
@echo off
REM CrawlLama API Server - Windows
REM Runs the FastAPI server via uv (auto-syncs the environment + the `api` extra).
REM Cleanup problematic NUL file if it exists (Windows filesystem bug)
if exist "nul" del /F /Q "\\?\%CD%\nul" 2>NUL
where uv >NUL 2>NUL
if errorlevel 1 (
echo ERROR: uv is not installed!
echo Install it with: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 ^| iex"
echo Then run setup.bat to provision the environment.
echo.
pause
exit /b 1
)
echo ========================================
echo CrawlLama API Server
echo ========================================
echo Starting FastAPI server...
echo API Documentation: http://localhost:8000/docs
echo ReDoc: http://localhost:8000/redoc
echo.
echo Press Ctrl+C to stop the server
echo ========================================
echo.
REM --extra api ensures fastapi/uvicorn/starlette are present.
uv run --extra api python app.py
REM Keep window open if error occurred
if errorlevel 1 (
echo.
echo An error occurred. Press any key to exit...
pause >NUL
)
exit