Guest User

Untitled

a guest
Jun 17th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. 'use strict'
  2. var Service = require('node-windows').Service;
  3.  
  4. // Create a new service object
  5. var svc = new Service({
  6. name:'nome-serviço JS',
  7. description: 'Serviço em NodeJS',
  8. script: require('path').join(__dirname,'server.js')
  9. });
  10.  
  11. // Listen for the "install" event, which indicates the
  12. // process is available as a service.
  13. svc.on('install',function(){
  14. svc.start();
  15. });
  16.  
  17. svc.install();
Add Comment
Please, Sign In to add comment