DEV Community

Discussion on: Getting started with Web Sockets in NodeJS

Collapse
 
mpv65 profile image
Martin Vaughan

Very useful article. Quick question: where does the 'myWebsocket' in the url ws://localhost:9876/myWebsocket come from? Is this a default path with ws?

Collapse
 
lucidmach profile image
Nukala Suraj

umm nope... "myWebsocket" in the url is the route that websocket supported

Collapse
 
hello_i_am_nice profile image
Maria

we have to implement this route by ourselves? or I cant understand how to connect frontend with this route? In node.js code snippet I dont see anything about this route

Thread Thread
 
behzadkhodapanah1993 profile image
Behzad Khodapanah

myWebsocket is a namespace, You can change it for whatever you want to, and in your html you must connect to your namespace. good luck