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
No known key found for this signature in database
GPG Key ID: 3E5E4F27F8D464C6
1 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,8 @@
import { NestFactory } from '@nestjs/core'; import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './modules/app.module'; import { ApplicationModule } from './modules/app.module';
const app = NestFactory.create(ApplicationModule); async function bootstrap() {
app.listen(3000, () => console.log('Application is listening on port 3000.')); const app = await NestFactory.create(ApplicationModule);
await app.listen(3000);
}
bootstrap();