Spaces:
Sleeping
Sleeping
File size: 1,472 Bytes
45e997f | 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 | @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
|