-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop.bat
More file actions
25 lines (20 loc) · 745 Bytes
/
Copy pathstop.bat
File metadata and controls
25 lines (20 loc) · 745 Bytes
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
@echo off
REM Stop backend and frontend dev servers.
REM Usage: stop.bat
cd /d "%~dp0"
echo Stopping dev servers...
REM Kill Go backend (go run spawns a child with the actual binary)
for /f "tokens=2" %%a in ('tasklist /fi "imagename eq main.exe" /fo list 2^>nul ^| find "PID:"') do (
taskkill /f /pid %%a >nul 2>&1
)
taskkill /f /im "main.exe" >nul 2>&1
REM Kill Vite dev server (node processes on port 5174)
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":5174 " ^| findstr "LISTENING"') do (
taskkill /f /pid %%a >nul 2>&1
)
REM Kill any go run parent
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":3000 " ^| findstr "LISTENING"') do (
taskkill /f /pid %%a >nul 2>&1
)
del /f .dev-pids >nul 2>&1
echo All stopped.