Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 2.1 KB

README.md

File metadata and controls

53 lines (37 loc) · 2.1 KB

Python 24/7 Project Hoster

This code is only compatible for python. For node.js, click me!


Applying

Open your main repl file (example: main.py etc...) and add keep_alive to import line. Now create a new file named keep_alive.py, then paste this script below:

from flask import Flask
from threading import Thread

app = Flask('')

@app.route('/')
def main():
    return 'Please connect me into a hosting website to enable 24/7 hosting. ItzNexus#5354'

def run():
    app.run(host="0.0.0.0", port=8080)

def keep_alive():
    server = Thread(target=run)
    server.start()

Run the repl, and copy the web address you see top right corner. And go to UptimeRobot and host your web address.


Contact me:

ItzSidhan | YouTube Discord Twitter


Languages and Tools:

JavaScript Node.js GitHub Visual Studio Code