What do you want to do with this project? I only see the server code. If you want to connect to an external server then it’s ok. If you want to make a full stack all like a chat app, then you need to host the client too
events.js:173
throw er; // Unhandled 'error' event
^
Error: Unexpected server response: 404
at ClientRequest.<anonymous> (/rbd/pnpm-volume/948802c6-3236-4c57-b9e1-5c9a8ee351a2/node_modules/.registry.npmjs.org/ws/7.4.3/node_modules/ws/lib/websocket.js:604:7)
at ClientRequest.emit (events.js:196:13)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:565:23)
at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
at TLSSocket.socketOnData (_http_client.js:452:22)
at TLSSocket.emit (events.js:196:13)
at addChunk (_stream_readable.js:290:12)
at readableAddChunk (_stream_readable.js:271:11)
at TLSSocket.Readable.push (_stream_readable.js:226:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17)
Emitted 'error' event at:
at abortHandshake (/rbd/pnpm-volume/948802c6-3236-4c57-b9e1-5c9a8ee351a2/node_modules/.registry.npmjs.org/ws/7.4.3/node_modules/ws/lib/websocket.js:722:15)
at ClientRequest.<anonymous> (/rbd/pnpm-volume/948802c6-3236-4c57-b9e1-5c9a8ee351a2/node_modules/.registry.npmjs.org/ws/7.4.3/node_modules/ws/lib/websocket.js:604:7)
[... lines matching original stack trace ...]
at TLSSocket.Readable.push (_stream_readable.js:226:10)