Service Not Showing in Services #372
Unanswered
sriharikrishna33
asked this question in
General
Replies: 2 comments
-
Note resolved yet, but I got some reponse from Cory on Issue 380 with possible same issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
FYI, I was able to resolve my issue. See the closing comment for #380 . Good luck. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Created as below after running I can see the installation is successful but not visible in the services list
`var Service = require('node-windows').Service;
// Create a new service object
var svc = new Service({
name: 'NodeJSAppNew',
description: 'NodeJSAppNew',
script: 'C:\Users\admin\deployments\index.js',
execPath:'',
nodeOptions: [
'--harmony',
'--max_old_space_size=4096'
]
//, workingDirectory: '...'
, allowServiceLogon: true
});
// Listen for the "install" event, which indicates the
// process is available as a service.
svc.on('install', function (install) {
console.log('iNSTALLED SUCCESSFULLY', install);
console.log('The service exists: ', svc.exists)
svc.start();
})
svc.on("alreadyinstalled", function () {
console.log("This service is already installed.");
});
// Listen for the "start" event and let us know when the
// process has actually started working.
svc.on("start", function () {
console.log(svc.name + " started!.");
});
svc.on("invalidinstallation ", function () {
console.log(" This service is detected but missing require files");
});
svc.on('error', function (error) {
console.error('FAILED TO INSTALL', error)
svc.start();
})
svc.install();`
Beta Was this translation helpful? Give feedback.
All reactions