I have this glitch app made of an express server and a discord bot, and I would like to be able to turn it off without archiving it, from a local variable.
I managed to turn off the discord bot by sending no API_KEY, and if I let the express app run the app keeps going. But I want to be able to turn off the express server too!
If I disable both the discord bot and the express server, the app terminates, then restarts continuously. That could do the trick, but I’m not happy with the idea of glitch trying to turn on an app that is not supposed to run.
here is the project but this idea could be useful for another project that is only a discord bot.
What I have tried, if local variable says to disable the app, it to call
process.exit(0) because I believed a finished process with no error would not restart. I was wrong
Does anyone know a way to let the app run for the contractual 5 minutes without being restarted over and over ?
I guess glitch still makes the app sleeps event if it restarts this way, but it’s to keep things clean.
Thank you !