-
-
Save zxdawn/66d82e56a99b2e67edfde9233d5528b8 to your computer and use it in GitHub Desktop.
24/7 repl.it hosting script
This file contains hidden or 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 "I'm alive" | |
def run(): | |
app.run(host='0.0.0.0',port=8080) | |
def keep_alive(): | |
t = Thread(target=run) | |
t.start() |
This file contains hidden or 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 keep_alive import keep_alive | |
keep_alive() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment