Keeping repl permanently alive.
So I have been making a repl that allows you to store items online but every time, after a certain amount of time, it shuts down the express server (nodejs) and it loses all data except users that have registered. Can someone help me to keep it online (eg. An example that works)?
Thanks in advance.
Note: the server is based off lolisafe and the script is at lolisafe.js.
Edit: db is not an option and uptime robot lasts 2 months.
just enter in the url, and ill keep the site up
If you can force the repl to crash using kill 1 when the repl crashes, then using the url ping.mat1.repl.co/__tail should turn the repl back on. Just have the repl run "kill 1" on exit, e.g. have a bash script that looks like this:
node main.js >> main.log
Try to make sure there are no errors first. Right now, there is a deprecation error.
Well, if you have items you need to save, you could use fs, which won't get rid of the sleeping part, but will store the data.