Python server
I'm running a simple server using aiohttp:
site = web.TCPSite(runner, host='0.0.0.0', port=self.webserver_port)
await site.start()
Profile:
web: python bot/main.py
But the site displays a "404 not found" error. Any ideas?
17 Replies
Project ID:
N/A
You might find these helpful:
- Can't connect to server/port
- I need support deploy a token Agora server to Railway
- Custom Domain
⚠️ experimental feature
Can't do TCP, must be an http server
At least for the time being
https://discord.com/channels/713503345364697088/820082368273973289/1081398121331961947
what about a Unix or socket site?
Not yet, see linked message
you'd need to configure a reverse proxy to proxy http to a unix/socket site using something like nginx, but for that you'd have to make a custom dockerfile
fckin a okay, that sounds hard so ill find a python package that lets me do http server
flask is very simple and works nicely
Second that
ok i tried with flask but its throwing "webhook post failed: unsupported protocol scheme"
you're using wss as the scheme right?
idk the default i guess
good to use "0.0.0.0" as the host?
Yes of course
hmm maybe need to specify SSL certificates?
No
any way to run it as http instead of https?
Nope