Server and publisher/subscrition
brew install nats-server
brew tap nats-io/nats-tools
brew install nats-io/nats-tools/nats
build server.conf in your react project
websocket: {
port: 9090,
no_tls: true
}
run nats server with configuration
nats-server -c ./public/server.conf
nats pub {subject} {data}
nats pub hello hahahaha