fix: remove debug test-run step, restore normal CI + cleanup main.ts
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 34s
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 34s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
f0ddd7cf38
commit
932bf362df
@ -85,12 +85,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd /opt/zhixi/backend && npx prisma generate
|
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
|
- name: Restart API service
|
||||||
run: |
|
run: |
|
||||||
sudo systemctl restart zhixi-api
|
sudo systemctl restart zhixi-api
|
||||||
|
|||||||
17
src/main.ts
17
src/main.ts
@ -97,19 +97,4 @@ async function bootstrap() {
|
|||||||
await app.listen(port);
|
await app.listen(port);
|
||||||
console.log(`[API] Server running on http://localhost:${port}`);
|
console.log(`[API] Server running on http://localhost:${port}`);
|
||||||
}
|
}
|
||||||
// Startup Crash Diagnostics
|
bootstrap();
|
||||||
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);
|
|
||||||
});
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user