Skip to content
Sign upLog in

How do I stop my nodejs repl from falling asleep?

Profile icon
Will_builder8

I tried using Uptime robot, but it still falls asleep after a while! How do I fix this?

You are viewing a single comment. View All
Profile icon
Vandesm14

Can you send me a screenshot of your Uptime Robot monitor?

Profile icon
Will_builder8

@Vandesm14
https://gyazo.com/58726a6c469b5ead2235a9683e0aab73

Profile icon
Vandesm14

@Will_builder8 Either place the "keep_alive" code into your main file, or use require('./keep_alive.js') instead of const keep_alive require('./keep_alive.js').
The way you have it now will set the file keep_alive.js to the variable keep_alive instead of running it. Try without the const keep_alive = first and see if that fixes it.

Profile icon
Vandesm14

@Will_builder8 Does that fix your issue?