Duration 3200

How to Run any Script 24/7 for Free (Replit)

97 257 watched
0
3.5 K
Published 21 Apr 2023

In this #shorts video i show you how to run your python or nodejs application for all the time 24/7, even your PC is turned off. I use replit and uptimerobot to run my scripts. Our Discord - https://discord.gg/QTsKJPp4nX Telegram - https://t.me/gunther_super Links: 1. replit.com 2. uptimerobot.com (for nodejs) keep_alive.js: var http = require('http'); http.createServer(function (req, res) { res.write("I'm alive"); res.end(); }).listen(8080); In the main file (index.js) add: const keep_alive = require('./keep_alive.js') (for python) keep_alive.py: from flask import Flask,render_template from threading import Thread app = Flask(__name__) @app.route('/') def index(): return "Alive" def run(): app.run(host='0.0.0.0',port=8080) def keep_alive(): t = Thread(target=run) t.start() in the main py file add: from keep_alive import keep_alive keep_alive() #python #programming #nodejs #coding #discord #replit #viral #video #viralvideo #viralshort

Category

Show more

Comments - 148