PotholeIQ / START_SERVER.bat
Varun10000's picture
PotholeIQ: initial deployable build (Box + Supabase, HF Spaces Docker)
45e997f
Raw
History Blame Contribute Delete
1.47 kB
@echo off
title Pothole Portal - Local Server
color 0A
echo.
echo ============================================
echo POTHOLE CITIZEN PORTAL - LOCAL SERVER
echo ============================================
echo.
echo Starting server on port 3030...
echo.
REM Prefer the Node backend because it serves both the app and the API
node --version >nul 2>&1
if %errorlevel% == 0 (
echo [Node.js] Full app + API server running at:
echo.
echo http://localhost:3030
echo.
echo This includes the Box workflow backend endpoints.
echo Press Ctrl+C to stop.
echo.
node server.js
goto end
)
REM Fallback to Python static hosting if Node is unavailable
python --version >nul 2>&1
if %errorlevel% == 0 (
echo [Python] Static server running at:
echo.
echo http://localhost:3030
echo.
echo WARNING: API backend endpoints will NOT be available in this mode.
echo.
python -m http.server 3030
goto end
)
REM Try Python3
python3 --version >nul 2>&1
if %errorlevel% == 0 (
echo [Python3] Static server running at:
echo.
echo http://localhost:3030
echo.
echo WARNING: API backend endpoints will NOT be available in this mode.
echo.
python3 -m http.server 3030
goto end
)
echo ERROR: Neither Node.js nor Python was found.
echo.
echo Please install Node.js from https://nodejs.org
echo or Python from https://python.org
echo then run this file again.
echo.
:end
pause