Skip to content

Commit f42193f

Browse files
authored
docs(microservices): add await on app.listen()
1 parent ad7ac87 commit f42193f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/microservices/basics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async function bootstrap() {
3333
transport: Transport.TCP,
3434
},
3535
);
36-
app.listen();
36+
await app.listen();
3737
}
3838
bootstrap();
3939
@@switch
@@ -45,7 +45,7 @@ async function bootstrap() {
4545
const app = await NestFactory.createMicroservice(AppModule, {
4646
transport: Transport.TCP,
4747
});
48-
app.listen(() => console.log('Microservice is listening'));
48+
await app.listen();
4949
}
5050
bootstrap();
5151
```

0 commit comments

Comments
 (0)