From 0805d965296696474f387f26f6cf8ef2a2b4faf4 Mon Sep 17 00:00:00 2001 From: Bram Borggreve Date: Wed, 13 Sep 2017 02:33:12 +0200 Subject: [PATCH] Update bootstrap logic in server.ts --- src/server.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/server.ts b/src/server.ts index 825ebdd..b1ed262 100644 --- a/src/server.ts +++ b/src/server.ts @@ -1,5 +1,8 @@ import { NestFactory } from '@nestjs/core'; import { ApplicationModule } from './modules/app.module'; -const app = NestFactory.create(ApplicationModule); -app.listen(3000, () => console.log('Application is listening on port 3000.')); \ No newline at end of file +async function bootstrap() { + const app = await NestFactory.create(ApplicationModule); + await app.listen(3000); +} +bootstrap();