Restart an app from its own code
Let an app ask SuperAdmin for a restart by creating a file.
An app can ask SuperAdmin to restart it: it creates an empty file named restart in its own folder. SuperAdmin checks for this file about once a minute. When it finds it, it removes the file and restarts the app.
This works in debug and in release mode.
Your app can create the file with any file function of Node.js. From the shell on the server:
touch /www/www/example_com-shop/restartReplace example_com-shop with the folder of your app. The folder of shop.example.com is example_com-shop; File browser and the Folders and files table help you find it.
The restart happens within about a minute. The process id in superadmin.pid changes when it is done.