fix(scripts): 本地启动 - 端口占用探测改用 7380/7381

This commit is contained in:
2026-10-10 09:31:32 +08:00
parent 9f4e14bb43
commit 46f4e04978

View File

@@ -78,7 +78,9 @@ function Test-ListeningPort([int]$Port) {
}
}
foreach ($port in @(3000, 8080)) {
# 本项目本地开发端口为前端 7380 / 后端 7381(见 AGENTS.md「本项目附加约定」)。
# 上游默认的 3000 / 8080 在同机上被其它工程占用,不能作为探测目标。
foreach ($port in @(7380, 7381)) {
if (Test-ListeningPort $port) {
throw "端口 $port 已被占用,请先关闭占用进程后重试。"
}