Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
4

wtf is up with repl and websockets

realTronsi
realTronsi

using websockets in repl:

I've asked this question before but it never worked

const ws = new WebSocket("wss://replname")
const ws = new WebSocket("wss://replname:port")

neither works

The server code is such:

const WebSocket = require("ws") const wss = new WebSocket.Server({ port: 3001 })

Every NodeJS related program coded in other IDEs such as ATOM or VS Code breaks upon forking into repl.

2 years ago
You are viewing a single comment. View All
1
Coder100
Coder100

iirc just do const ws = new WebSpcket("wss://replname");

2 years ago
1
realTronsi
realTronsi

@Coder100
ik but that doesn't work on repl idfk why. repl is broken

2 years ago
1
realTronsi
realTronsi

@Coder100
yep, but repl is https so obviously ws:// doesn't work

2 years ago
1
realTronsi
realTronsi

@Coder100
I feel like this is a bug at this point

2 years ago