diff --git a/src/main.ts b/src/main.ts index 2dc3eea..b9b9e46 100644 --- a/src/main.ts +++ b/src/main.ts @@ -37,6 +37,11 @@ async function bootstrap() { app.enableCors(); } - await app.listen(process.env.PORT ?? 4000); + const port = Number(process.env.PORT ?? 4000); + await app.listen(port, '0.0.0.0'); + console.log(`grow-api listening on 0.0.0.0:${port}`); } -bootstrap(); +bootstrap().catch((error) => { + console.error('Failed to start grow-api:', error); + process.exit(1); +});