Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: Better startup and failure message for backend

jamesread94ad61a35ebe
diff --git a/apps/backend/src/main.ts b/apps/backend/src/main.ts
index 6b0bd131e..7cc0a962e 100644
--- a/apps/backend/src/main.ts
+++ b/apps/backend/src/main.ts
@@ -35,8 +35,14 @@ async function bootstrap() {
loadSwagger(app);
const port = process.env.PORT || 3000;
- await app.listen(port);
- Logger.log(`πŸš€ Application is running on: http://localhost:${port}`);
+
+ try {
+ await app.listen(port);
+
+ Logger.log(`πŸš€ Backend is running on: http://localhost:${port}`);
+ } catch (e) {
+ Logger.error(`Backend failed to start on port ${port}`, e);
+ }
}
bootstrap();