Skip to content

Commit

Permalink
fix: enable shutdown hooks
Browse files Browse the repository at this point in the history
Close #316
  • Loading branch information
IKatsuba committed Jan 15, 2024
1 parent 5a8ce9f commit 296c11d
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 296c11d

Please # to comment.