Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict'
- var Service = require('node-windows').Service;
- // Create a new service object
- var svc = new Service({
- name:'nome-serviço JS',
- description: 'Serviço em NodeJS',
- script: require('path').join(__dirname,'server.js')
- });
- // Listen for the "install" event, which indicates the
- // process is available as a service.
- svc.on('install',function(){
- svc.start();
- });
- svc.install();
Add Comment
Please, Sign In to add comment