Skip to content

Instantly share code, notes, and snippets.

@RPTST
Forked from beaucarnes/keep_alive.py
Created October 11, 2021 03:48
Show Gist options
  • Save RPTST/b707e0968a31dbeee6fb667c55ef8458 to your computer and use it in GitHub Desktop.
Save RPTST/b707e0968a31dbeee6fb667c55ef8458 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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment