Last active
May 15, 2025 06:34
-
-
Save ajsya/31b89d1368fd7603924ecdf715d6e882 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