库房摄像头直播后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
564 B

4 years ago
  1. let path = require('path');
  2. let Service = require('node-windows').Service;
  3. // Create a new service object
  4. let svc = new Service({
  5. name:'node windows server test', //名称
  6. description: 'The socket.io nodejs server test ',//描述
  7. script: './bin/www',//node执行入口
  8. execPath:'C:\\Program Files\\nodejs\\node.exe',
  9. nodeOptions: [
  10. '--harmony',
  11. '--max_old_space_size=4096'
  12. ]
  13. });
  14. // Listen for the "install" event, which indicates the
  15. // process is available as a service.
  16. svc.on('install',function(){
  17. svc.start();
  18. });
  19. svc.install();