Design: https://github.com/appscode/nats-design
-
Run
nats-account-server$ ./nats-account-server -c account-server.conf & -
Now checkout to
<project-directory>/nats-v2directory.$ cd nats-v2 -
All necessary accounts are already created. Even then you want to create again, run
( Optional ):$ go run accounts/main.go
-
Now start the
Classic Natsserver$ go run server/main.go & -
Start a subscriber to
Classic Natswhich will receive all the events sent to*.Events. This program redirects all the incomingeventsto thejetstreamserverStreamnamedReceivedEvents.$ go run sub/main.go
-
Checkout to the
<project-directory>/natsdirectory$ cd nats -
All necessary accounts are already created. Even then you want to create again, run
( Optional ):$ go run accounts/main.go
-
Start the
Jetstreamserver$ go run server/main.go & -
Start the receiver which checks all the
eventssent to the stream and after processing the events it sends them to theuser'sNotificationschannel.$ go run receiver/main.go
-
Checkout to the
<project-directory>/nats.wsdirectory$ cd nats.ws -
Serve the
htmlfile$ npm install http-server -g $ http-server -o