Skip to content

Commit 4f1724e

Browse files
Merge pull request #1963 from bilalshaikh42/patch-1
docs: update nats microservice docs for 8.0
2 parents da69ad3 + fb87824 commit 4f1724e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/microservices/nats.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ To use the NATS transporter, pass the following options object to the `createMic
1919
const app = await NestFactory.createMicroservice<MicroserviceOptions>(AppModule, {
2020
transport: Transport.NATS,
2121
options: {
22-
url: 'nats://localhost:4222',
22+
servers: ['nats://localhost:4222'],
2323
},
2424
});
2525
@@switch
2626
const app = await NestFactory.createMicroservice(AppModule, {
2727
transport: Transport.NATS,
2828
options: {
29-
url: 'nats://localhost:4222',
29+
servers: ['nats://localhost:4222'],
3030
},
3131
});
3232
```
@@ -52,7 +52,7 @@ One method for creating an instance is to use the `ClientsModule`. To create a c
5252
name: 'MATH_SERVICE',
5353
transport: Transport.NATS,
5454
options: {
55-
url: 'nats://localhost:4222',
55+
servers: ['nats://localhost:4222'],
5656
}
5757
},
5858
]),
@@ -80,7 +80,7 @@ NATS provides a built-in load balancing feature called [distributed queues](http
8080
const app = await NestFactory.createMicroservice(AppModule, {
8181
transport: Transport.NATS,
8282
options: {
83-
url: 'nats://localhost:4222',
83+
servers: ['nats://localhost:4222'],
8484
queue: 'cats_queue',
8585
},
8686
});

0 commit comments

Comments
 (0)