Skip to content

Commit

Permalink
Merge pull request #317 from IKatsuba/shutdown-hooks
Browse files Browse the repository at this point in the history
fix: enable shutdown hooks
  • Loading branch information
IKatsuba authored Jan 15, 2024
2 parents 5a8ce9f + 296c11d commit f8fc516
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ async function bootstrap() {
const configService = app.get<ConfigService<Environment>>(ConfigService);

const port = configService.get('PORT', 3000);

if (configService.get('ENV') !== 'development') {
app.enableShutdownHooks();
}

await app.listen(port);
logger.log(
`🚀 Application is running on: http://localhost:${port}/${globalPrefix}`
Expand Down

0 comments on commit f8fc516

Please sign in to comment.