Skip to content

Instantly share code, notes, and snippets.

@Apraxed
Created January 25, 2022 04:55
Show Gist options
  • Save Apraxed/0d5691b75fe9a7f58425c8584e806087 to your computer and use it in GitHub Desktop.
Save Apraxed/0d5691b75fe9a7f58425c8584e806087 to your computer and use it in GitHub Desktop.
Flask Server
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