Closed zhoub1994 closed 5 years ago
Windows10 environment. Running install does not follow the service, and the install listener function is not executed. The same is true on server 2008.
const svc = new Service({ name: CONFIG.ServiceName, description: 'this is description', script: path.join(__dirname, 'index.js') }) svc.on('install', () => { svc.start(); }) if (svc.exists) { console.log(`${CONFIG.ServiceName}!`); svc.restart(); } else { svc.install(); } // svc.install(); // console.log(svc.exists)
This is the relevant code.
@CheiZhei Please did you find a solution to this??
Windows10 environment. Running install does not follow the service, and the install listener function is not executed. The same is true on server 2008.
This is the relevant code.