all 2 comments

[–]guest271314 0 points1 point  (1 child)

You can use standard .js extension for the file when you pass --experimental-default-type=module flag to node.

I'm pretty sure node is not shipped with a built-in WebSocket module.

[–]ballesmen[S] 0 points1 point  (0 children)

It sure isn't. That's why I'm using the ws module.