$ git clone https://github.com/prerender/prerender.git $ cd prerender $ cnpm install $ node server.js
cnpm install node-windows --save
let Service = require('node-windows').Service; let svc = new Service({ name: 'node_test', //服務名稱 description: '測試項目服務器', //描述 script: 'D:\\projects\\ng\\prerender\\server.js' //nodejs項目要啓動的文件路徑 }); svc.on('install', () => { svc.start(); }); svc.install();
node nw.js