Connect using websocket ?
See original GitHub issueHello, i want ask a question. I’m enabling websocket connection on nats-server config, can this library connect using websocket protocol instead standard protocol ? i’m already tried change server url from localhost:4222
into ws://localhost:${PORT}
but got nothing response.
My Environtment: node: 14.17.5 natsjs: ^2.2.0 nats-server: docker alpine:latest
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
The WebSocket API (WebSockets) - Web APIs - MDN Web Docs
desktop desktop
Chrome Edge
WebSocket Full support. Chrome4. Toggle history Full support. Edge12. Toggl...
WebSocket() constructor Full support. Chrome4. Toggle history Full support. Edge12. Toggl...
Read more >WebSocket
To open a websocket connection, we need to create new WebSocket using the special protocol ws in the url: let socket = new...
Read more >Using WebSocket requests
In Postman you can create a WebSocket request with a server, and use it to send and receive messages across the WebSocket connection....
Read more >Using WebSocket to build an interactive web application
The connect() function uses SockJS and stomp.js to open a connection to /gs-guide-websocket , which is where our SockJS server waits for connections....
Read more >WebSockets - Opening Connections
WebSockets - Opening Connections, Once a connection has been established between the client and the server, the open event is fired from Web...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Be sure to fully read: https://github.com/nats-io/nats.ws/blob/master/README.md and https://github.com/nats-io/nats.ws/blob/master/README.md#installation
If you are running on the browser, you’ll also want to take a peek at: https://github.com/nats-io/nats.ws/blob/master/developer_notes.md
correct - if you installed as
npm install nats.ws
, then your import will be:If you are using node, as I was, the import was from the
./node_modules/nats.ws/nats.cjs