Files
jiang13-bbs/stop.bat
freefire 5052bcd805 chore(dev): 按端口杀进程树,避免 Windows 孤儿监听
新增 stop.bat/ps1/sh,并写入本地开发规则:停服务用脚本、停后复核端口。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 07:27:45 +08:00

22 lines
743 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@echo off
title jiang13-bbs stopper
echo ============================================
echo jiang13-bbs Dev Stopper
echo ============================================
echo.
echo 按端口终止监听进程树(:3000 前端 / :3001 后端)...
echo.
REM 仅关 Cursor 终端 / Ctrl+C 往往杀不掉 go run / node 的子进程;
REM 此处按 Listen 端口取 OwningProcess,再 taskkill /T 杀整棵树。
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0stop.ps1"
if errorlevel 1 (
echo [WARN] stop.ps1 执行异常,可手动:taskkill /T /F /PID ^<pid^>
)
echo.
echo [OK] 端口清理完成。
echo PostgreSQL(Docker)未动;若要停库:docker compose down
echo ============================================
pause