$ cd app
$ mkdir nats-test
$ cd nats-test
$ npm init -y
$ npm install --save node-nats-streaming ts-node-dev typescript @types/node
$ tsc --init
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
auth-deployment-59d887f775-h9nxq 1/1 Running 0 109m
auth-mongo-deployment-d79ff8f7c-lj92m 1/1 Running 0 109m
client-deployment-65576ffc88-vxvv4 1/1 Running 0 109m
nats-deployment-6bf654c867-cvc2q 1/1 Running 0 109m
tickets-deployment-5c57b69d6c-kbb6c 1/1 Running 0 109m
tickets-mongo-deployment-869f7b4c75-9q48f 1/1 Running 0 109m
$ kubectl port-forward nats-deployment-6bf654c867-cvc2q 4222:4222
$ kubectl port-forward nats-deployment-6bf654c867-cvc2q 8222:8222
$ cd nats-test
$ npm run publish
$ npm run listen
console with publisher: rs + [Enter]
browser
http://localhost:8222/streaming
http://localhost:8222/streaming/channelsz?subs=1
Marley
Any questions in english: Telegram Chat
Любые вопросы на русском: Телеграм чат