Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. var Service = require('node-windows').Service;
  2.  
  3. // Create a new service object
  4. var svc = new Service({
  5. name:'Hello World',
  6. description: 'The nodejs.org example web server.',
  7. script: 'C:\path\to\helloworld.js'
  8. });
  9. // Listen for the "install" event, which indicates the
  10. // process is available as a service.
  11. svc.on('install',function(){
  12. svc.start();
  13. });
  14. svc.install();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement