We have a node-windows service that runs our API. Sometimes when I start it, it immediately dies for no apparent reason. I go to restart it and it stops as soon as it starts. No helpful error messages in event viewer. Usually un-installing and re-installing the service does the trick, but today it doesn't.
Here's the code:
var Service = require('node-windows').Service;
// Create a new service object
var svc = new Service({
name:'Node.js Service Management API',
description: 'The nodejs.org service management api.',
script: 'D:\\Program Files\\nodeApps\\service-management-api\\server\\index.js'
});
// Listen for the "install" event, which indicates the
// process is available as a service.
svc.on('install',function(){
svc.start();
});
svc.install();
Any clues?