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



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

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

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

Comments are closed.