feat(M01-A): 建立后端API基础骨架

This commit is contained in:
Codex
2026-06-16 20:37:55 +08:00
parent eb259ce2a4
commit 98b66d22f2
22 changed files with 437 additions and 19 deletions
+26
View File
@@ -0,0 +1,26 @@
$ErrorActionPreference = "Stop"
$requiredFiles = @(
"backend/package.json",
"backend/tsconfig.json",
"backend/.env.example",
"backend/src/app.ts",
"backend/src/config.ts",
"backend/src/routes/health.ts",
"backend/src/server.ts",
"backend/tests/backend-contract.test.mjs",
"deploy/pm2/ecosystem.config.cjs"
)
foreach ($path in $requiredFiles) {
if (-not (Test-Path $path)) {
throw "Required backend file missing: $path"
}
}
& npm --prefix backend test
if ($LASTEXITCODE -ne 0) {
throw "backend contract test failed"
}
Write-Host "PASS: backend M01-A skeleton check passed."