Skip to content
Sign upLog in
← Back to Community

How do Ports Work in repl?

Profile icon
realTronsiHacker

How do ports work in repl? The other day I tried forking one of my applications into repl for some testing purposes, but ports don't seem to work the same way.

const ws = new Websocket("wss://domain.com:3000")

Putting something like that wouldn't work, and I'm not sure if repl presets a port or has some other API I'm unaware about.

Voters
Profile icon
JuanBautistta
Profile icon
hammamikhairi
Profile icon
Julius170
Profile icon
CoolChurro
Profile icon
cokie
Profile icon
realTronsi
Comments
hotnewtop
Profile icon
ironblockhd

Replit uses a proxy that forces anything on port 80 and only supports tcp, specify port 80 instead of 3000 in the client side

Profile icon
Coder100

Simply put, if your local project had: localhost:8080
In repl.it it becomes: [yourrepl].[yourname].[repl].[co]

If you had: 127.0.0.1:8080, you will need to change the IP to 0.0.0.0: 0.0.0.0:8080

Then: [yourrepl].[yourname].[repl].[co]

Profile icon
realTronsi

@Coder100
So there's no need for a port specification in repl?[yourrepl].[yourname].[repl].[co]

Profile icon
Coder100

nope

@realTronsi