-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change daemon directory #269
Comments
I really need this option too! |
I'll be looking at this today too, as I ideally want the scripts and their daemon directories away from the project |
This would be very useful! |
based on hosseinpro comments coreybutler#269
I added custom property 'installPath':'./daemon' my repo: https://github.com/can-acar/Node-Windows |
I wanted to install a second Node service from the same base folder. I followed @hosseinpro 's instructions to create the daemon in an alternate folder. I had this line in my install file: |
While this is fixed, you can replace the const service = new Service({
name: 'My Service',
script: join(__dirname, '..', 'main.js'),
});
const installDir = join(__dirname, '..', '..');
Object.defineProperty(service, '_directory', {
enumerable: false,
writable: true,
configurable: false,
value: installDir,
}); |
I put my source files in
/src
similar to many other projects and since myindex.js
in under/src
the output daemon folder will be created as/src/daemon
. I need to specify the output daemon folder in node-windows config likedaemonDir
. If you add this option it's very good.Meanwhile, I solved my problem as follows:
I changed
node_modules\node-windows\lib\daemon.js
file at line 258 from:to
And specify
daemonDir
at config:The text was updated successfully, but these errors were encountered: