As of September 24, 2014, NFS now supports ongoing processes:
To summarize the process described in the mopsled.com third-party example:
1) In the user interface of the NFS.N administrator, select the short domain name of the site in the " Sites" section, and then change the "Server Type" of this site to "Custom" instead of PHP / Apache.
2) Put your Node server code somewhere in /home/protected/
3) Create a shell script file (e.g. run.sh ) somewhere in /home/protected/ that contains the commands to start your server (e.g. npm run start or node server.js ). NFS.N will automatically run this script as a continuous process using the "Daemon", which we will configure in the next step.
4) Select "Demons" in the NFS.N user interface of your site and enter the path to the shell script to start your server in the "Command line" field. Fill in the other fields as you see fit.
5) NFS.N now guarantees that your user server process will run indefinitely. Your web server will now be accessible through the port that your server is listening on. However, NFS.N does not provide root access to your server for communication through regular "low-level" Internet ports (for example :80 and :443 ), so if you want to service them, you must use NFS.N ". Function proxy "is described in the next step.
6) If you need to listen to low-level ports: select "Add proxy" in the NFS.N user interface of your site and enter the appropriate parameters, checking the "Bypass Apache completely" option and providing the port that your server is listening on. for Target Port.
It! Now you can stop / restart the continuous server process (the shell script that the daemon supports) on the daemon configuration page.
source share