Skip to content
Sign upLog in
← Back to Community
How do you host a server on replit?
Profile icon
AphixDev

I was playing around with socket.io in python, and I was able to make a server, but I have no clue how to connect to it. Any help?

Answered by a5rocks [earned 5 cycles]
View Answer
Voters
Profile icon
Solivagant
Profile icon
bddy
Profile icon
Andrewdagod
Profile icon
AphixDev
Comments
hotnewtop
Profile icon
a5rocks

That's not socket.io... By the way, only http requests can get to your repl, so this won't be possible, so you need to use something like websockets or aforementioned socket.io (though I can't to find how to do a socket.io server in python)

Profile icon
AphixDev

@a5rocks
I kind of see. There's not much about websockets online. I'm still unsure how to host a server on replit.

Profile icon
AphixDev

@a5rocks
Is socket just for creating sockets and not servers?

Profile icon
a5rocks

@nt998302
Yeah, socket is probably too low level for you to build anything decent on, I would recommend reading though: https://websockets.readthedocs.io/en/stable/

Profile icon
AphixDev

@a5rocks
Ok. Do you know how to host a server with replit tho? I see people hosting their servers via link with node js. Not sure how to set one up tho.

Profile icon
a5rocks

@nt998302
Well, you use socket.io in node, or even websockets in python should set the server up. Though if you want to be able to look at the pages in python I would recommend "Flask" (there's a couple tutorials in the Learn board)

Profile icon
AphixDev

@a5rocks
Sounds good. Thanks for the help! :)