Design: https://github.com/appscode/nats-design
-
Run
nats-account-server
$ ./nats-account-server -c account-server.conf &
-
Now checkout to
<project-directory>/nats-v2
directory.$ 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 Nats
server$ go run server/main.go &
-
Start a subscriber to
Classic Nats
which will receive all the events sent to*.Events
. This program redirects all the incomingevents
to thejetstream
serverStream
namedReceivedEvents
.$ go run sub/main.go
-
Checkout to the
<project-directory>/nats
directory$ cd nats
-
All necessary accounts are already created. Even then you want to create again, run
( Optional )
:$ go run accounts/main.go
-
Start the
Jetstream
server$ go run server/main.go &
-
Start the receiver which checks all the
events
sent to the stream and after processing the events it sends them to theuser's
Notifications
channel.$ go run receiver/main.go
-
Checkout to the
<project-directory>/nats.ws
directory$ cd nats.ws
-
Serve the
html
file$ npm install http-server -g $ http-server -o