'testing if client can see if port is listening but not sure how to find port or if my connection is possible
I have tried to run this code to create a Websocket but i think i cannot either because sue i don’t know my port number or i have not downloaded something.
const Websocket = require('ws')
const wss = new Websocket.Server({
port:5500
})
Console.log(`Say hi to websocket on port 5500`)
Error: Cannot find module '/Users/mad/Websockets-UDEMY/index.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
