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
Percy
Percy2y ago
Project ID: N/A
Percy
Percy2y ago
⚠️ experimental feature
Brody
Brody2y ago
Can't do TCP, must be an http server At least for the time being https://discord.com/channels/713503345364697088/820082368273973289/1081398121331961947
Rawlo Dawgins
Rawlo Dawgins2y ago
what about a Unix or socket site?
Brody
Brody2y ago
Not yet, see linked message
jackson
jackson2y ago
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
Rawlo Dawgins
Rawlo Dawgins2y ago
fckin a okay, that sounds hard so ill find a python package that lets me do http server
jackson
jackson2y ago
flask is very simple and works nicely
Brody
Brody2y ago
Second that
Rawlo Dawgins
Rawlo Dawgins2y ago
ok i tried with flask but its throwing "webhook post failed: unsupported protocol scheme"
Brody
Brody2y ago
you're using wss as the scheme right?
Rawlo Dawgins
Rawlo Dawgins2y ago
idk the default i guess good to use "0.0.0.0" as the host?
Brody
Brody2y ago
Yes of course
Rawlo Dawgins
Rawlo Dawgins2y ago
hmm maybe need to specify SSL certificates?
Brody
Brody2y ago
No
Rawlo Dawgins
Rawlo Dawgins2y ago
any way to run it as http instead of https?
Brody
Brody2y ago
Nope
Want results from more Discord servers?
Add your server