This repository has been archived on 2025-02-16. You can view files and clone it, but cannot push or open issues or pull requests.
sidBot/keep_alive.py

15 lines
238 B
Python
Raw Normal View History

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()