Skip to content

Commit f32d7a3

Browse files
Update hybrid-application.md
1 parent 6838ecb commit f32d7a3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

content/faq/hybrid-application.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ To connect multiple microservice instances, issue the call to `connectMicroservi
1616

1717
```typescript
1818
const app = await NestFactory.create(AppModule);
19-
// microservice 1
20-
const ms1 = app.connectMicroservice({
19+
// microservice #1
20+
const microserviceTcp = app.connectMicroservice<MicroserviceOptions>({
2121
transport: Transport.TCP,
2222
options: {
2323
port: 3001,
2424
},
2525
});
26-
// microservice 2
27-
const ms2 = app.connectMicroservice({
28-
transport: Transport.TCP,
26+
// microservice #2
27+
const microserviceRedis = app.connectMicroservice<MicroserviceOptions>({
28+
transport: Transport.REDIS,
2929
options: {
30-
port: 3002,
30+
url: 'redis://localhost:6379',
3131
},
3232
});
3333

0 commit comments

Comments
 (0)