resolve the hanging process and dramatically reduce your pipeline's runtime
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 37m21s

This commit is contained in:
2025-11-27 03:47:33 -08:00
parent 33957a82ce
commit 1c5c50ff20
2 changed files with 31 additions and 53 deletions

View File

@@ -136,12 +136,16 @@ app.use((err: Error, req: Request, res: Response, next: NextFunction) => {
}
});
const PORT = process.env.PORT || 3001;
app.listen(PORT, () => {
logger.info(`Authentication server started on port ${PORT}`);
});
if (process.env.NODE_ENV !== 'test') {
const PORT = process.env.PORT || 3001;
app.listen(PORT, () => {
logger.info(`Authentication server started on port ${PORT}`);
console.log('--- REGISTERED API ROUTES ---');
console.table(listEndpoints(app));
console.log('-----------------------------');
});
}
console.log('--- REGISTERED API ROUTES ---');
console.table(listEndpoints(app));
console.log('-----------------------------');
// --- END ROUTE DEBUGGING ---
// Export the app for integration testing
export default app;