See the answers to the same question on stackoverflow: https://stackoverflow.com/questions/20445599/auto-start-node-js-server-on-boot