@echo off echo Stopping AlgoSpaced application stack... :: Find and kill process on port 8000 (FastAPI Backend) for /f "tokens=5" %%a in ('netstat -aon ^| findstr ":8000" ^| findstr "LISTENING"') do ( echo Terminating backend PID %%a on port 8000... taskkill /F /PID %%a >nul 2>&1 ) :: Find and kill process on port 5173 (Vite Frontend) for /f "tokens=5" %%a in ('netstat -aon ^| findstr ":5173" ^| findstr "LISTENING"') do ( echo Terminating frontend PID %%a on port 5173... taskkill /F /PID %%a >nul 2>&1 ) echo AlgoSpaced servers stopped cleanly. pause