From 932bf362df576d450065aaa97fc78d4bf97d933e Mon Sep 17 00:00:00 2001 From: WangDL Date: Sun, 24 May 2026 12:50:19 +0800 Subject: [PATCH] fix: remove debug test-run step, restore normal CI + cleanup main.ts Co-Authored-By: Claude Opus 4.7 --- .gitea/workflows/deploy.yml | 6 ------ src/main.ts | 17 +---------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 9a8ee8e..8008e67 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -85,12 +85,6 @@ jobs: run: | cd /opt/zhixi/backend && npx prisma generate - - name: Run app directly (5s max, raw output) - run: | - cd /opt/zhixi/backend - timeout 5 node dist/main.js 2>&1 - echo "[EXIT:$?]" - - name: Restart API service run: | sudo systemctl restart zhixi-api diff --git a/src/main.ts b/src/main.ts index 52336c3..ed14af0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -97,19 +97,4 @@ async function bootstrap() { await app.listen(port); console.log(`[API] Server running on http://localhost:${port}`); } -// Startup Crash Diagnostics -process.on('uncaughtException', (err) => { - console.error('[FATAL] Uncaught Exception:', err.message); - console.error(err.stack); - process.exit(1); -}); -process.on('unhandledRejection', (reason) => { - console.error('[FATAL] Unhandled Rejection:', reason); - process.exit(1); -}); - -bootstrap().catch((err) => { - console.error('[FATAL] Bootstrap failed:', err.message); - console.error(err.stack); - process.exit(1); -}); +bootstrap();