Connect your Vue.js application to Nats cluster using a relay server. By building a relay server with Node.js you can receive events from Nats on you Vue.js application.
By using a relay server as a proxy server between Nats cluster and Vue.js application you can:
- Increase security in Nats connections
- Simple event receiving in client side
- Add filters for getting events
- Having a dynamic subscribing system
- Implementing a caching system if needed
Use docker-compose
to set a Nats cluster and Application
on localhost:80
.
docker compose up -d