Multiple ports support is broken

Problem description:
Multiple ports only works on a few undocumented ports.

Expected behavior:
Port 5432 should work, as listed in the documentation.

Actual behavior:
Only a few ports work, like 9000.

Steps to reproduce:
Try to use multiple ports support

Bug appears at this link:
https://multiple-ports-in-one-repl.fossprime.repl.co/

1 Like

This is happening to me too on that repl. So, I tried it on my own repl, same problem.

Perhaps something else is running on 5432?

IDK, just guessing.

Here is my repl: https://ugly-sonic.doxr.repl.co:9000/

Also, could the port be blocked by a firewall?

3 Likes

I’ve been having issues with multiple ports for a good while now too. Workaround would be to configure nginx on the Repl if you can.

2 Likes

The only port that’s taken by default is 8283. The only ports that work are 5900, 8099 and 9000.

5900 is assumed to be VNC and will break deployments. So in total you have to make do with 3 ports right now. That’s not enough for even a basic server, where you want a test port, a debug port, a primary dev API port, a secondary dev API port, a testing GUI port (vitest-gui) and a repl server port… that’s six.

And that’s not accounting for the web client(s) and their tools if it’s in the same repo.

I don’t know what’s running on 8283 https://replit.com/@fossprime/port-quiz-xl#.replit:21788
Screenshot from 2023-05-18 21-37-52
Replspace??? wth

5 Likes

Based on the way replit is designed, afaik you are supposed to just create repls for each, instead of hosting on different ports for each. Each project has it’s own computer/environment instead of it’s own port.

3 Likes

https://blog.replit.com/replspace-templates? (The description given there is very vague)

4 Likes

The ReplSpace API is used for Git in the shell. It has a few routes like /files/open and /github/token to open files in the editor, and to request the user’s GitHub token.

6 Likes

This seems really helpful. I’ve been looking for a way to open files in the ide from code. I don’t love VIM/nano. It’s hard to get other people to learn vim too. the replit-git-editor command isn’t always available and fails a lot.

I’ll give curl http://localhost:8283/files/open a try… I have no idea what payload I should give it. or how to tcpdump on a replit without root.

3 Likes