// Create a new service object
var svc = new Service({
name:'test',
description: 'test',
script: 'E:\test\test.js',
nodeOptions: [
'--harmony',
'--max_old_space_size=4096'
]
});
// Listen for the "install" event, which indicates the
// process is available as a service.
svc.on('install',function(){
svc.start();
});
svc.install();
after running this nothing shows up? in the Service.msc
You may need E:\\test\\test.js, otherwise JavaScript may be escaping your path (i.e. it thinks of it as E:testtest.js). Also check the wiki for troubleshooting on common issues.
var Service = require('node-windows').Service;
// Create a new service object var svc = new Service({ name:'test', description: 'test', script: 'E:\test\test.js', nodeOptions: [ '--harmony', '--max_old_space_size=4096' ] });
// Listen for the "install" event, which indicates the // process is available as a service. svc.on('install',function(){ svc.start(); });
svc.install();
after running this nothing shows up? in the Service.msc