Created
January 25, 2022 04:55
-
-
Save Apraxed/0d5691b75fe9a7f58425c8584e806087 to your computer and use it in GitHub Desktop.
Flask Server
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(__name__) | |
@app.route('/') | |
def home(): | |
return "keeping old server" | |
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