T
T
TheBeJIIHiu2021-11-28 14:41:31
Node.js
TheBeJIIHiu, 2021-11-28 14:41:31

Heroku turns off every 20-30 minutes, what should I do?

Ku, I have a Heroku application JP : Node.JS , in short, my Heroku is cut down every 20-30 minutes, but I have an idea, if I use the REQUEST module, I will add this to app.js:

setInterval(() => {
var request = require("request");
var url = "http://miricgamebot.herokuapp.com" // My heroku app
request(url, (error, response, body) => {
console.log(body)
})
}, 300000)

This will make a request to my site every 5 minutes so my app won't shut down??? Can I do with the help of the browser module , this module can parse the entire site then it will work if the first one does not work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-11-28
@TheBeJIIHiu

Yes, then it will not turn off, most likely.
Judging by the fact that there was no answer for an hour, it would be faster to check it yourself)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question