a simple way to restart your app without actually restarting node.js
makes it possible to restart your app without restarting the main node.js process itself.
restartable takes advantage of the node.js cluster module. When a node process is forked using the cluster module, all the sourcefiles are being read from disk, making a virtual restart of node.js possible.
It is recommended for development or maintainance work.
It has not been tested in combination with apps that actually use cluster.
require"restartable"console.log"this code is restartable";setTimeoutparRestartableObjrestart;2000;console.log"this code is not restartable";setTimeoutparRestartableObjrestart;8000;;