How to completely restart the code
Sure, try something like this:
and to restart your code,
now, because it keeps running
node . FOREVER, after exiting the program, it will run it again.