Skip to content

Instantly share code, notes, and snippets.

@beaucarnes
Created December 10, 2020 15:42
Show Gist options
  • Save beaucarnes/51ec37412ab181a2e3fd320ee474b671 to your computer and use it in GitHub Desktop.
Save beaucarnes/51ec37412ab181a2e3fd320ee474b671 to your computer and use it in GitHub Desktop.
Python Server for Discord Bot
from flask import Flask
from threading import Thread
app = Flask('')
@app.route('/')
def home():
return "Hello. I am alive!"
def run():
app.run(host='0.0.0.0',port=8080)
def keep_alive():
t = Thread(target=run)
t.start()
@lab596
Copy link

lab596 commented Aug 31, 2022

I hate replit soo much, this problem still hasn't been fixed yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment