Skip to content
Sign upLog in
← Back to Community

Two ports in one REPL

Profile icon
IhorMelnyk

Hello. Can i run HTTP servers (TWO of them) on one repl, or i need to do it in different repls?

Server1 says "Hello from server1" on port 8080
Server2 says "Hello from server2" on port 8081

Voters
Profile icon
filipmares
Profile icon
IhorMelnyk
Comments
hotnewtop
Profile icon
Vandesm14

Depends, what are you trying to do with two servers that you can't accomplish with just one?

Profile icon
IhorMelnyk

@Vandesm14
Just interesting in that. Would be good to luanch Web server via Python and database (http-based one) on another

Profile icon
Vandesm14

@IhorMelnyk
You can host a database on the same server, just make sure the routes are different. If you don't want to have the database and webserver on the same repl, you'd have to use two repls.