Wednesday, February 24, 2016

Create a new service in Node.js

var Service = require('node-windows').Service;

// Create a new service object
var svc = new Service({
  name:'SilverCross',
  description: 'iclaim Ftp Notification Service.',
  script: 'D:\\Push\\Push.js'
});

// Listen for the "install" event, which indicates the
// process is available as a service.
svc.on('install',function(){
  svc.start();
});

svc.install();

No comments :

Post a Comment