1from flask import Flask
2from threading import Thread
3
4app = Flask('')
5
6@app.route('/')
7def home():
8 return "Hello. I am alive!"
9
10def run():
11 app.run(host='0.0.0.0',port=8080)
12
13def keep_alive():
14 t = Thread(target=run)
15 t.start()