-
-
Save brianparkerin/81e91e22b2e11493c5ffe6f7b97ae36d to your computer and use it in GitHub Desktop.
Python Server for Discord Bot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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