Update bootstrap logic in server.ts

This commit is contained in:
Bram Borggreve
2017-09-13 02:33:12 +02:00
parent f998f7292d
commit 0805d96529
+5 -2
View File
@@ -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.'));
async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
await app.listen(3000);
}
bootstrap();