Closed loebi-ch closed 6 years ago
You need to change the location of the daemon or use a different directory for the log file. That's where the conflict is coming from. This isn't a node-windows problem. Closing this issue.
How do we change the directory for the log with node-windows module? The way i found to fix it is by creating a new directory with fs :
const fs = require('fs');
const svc = new service({
name : "package name",
description : "what ever description",
script : "script.js"
});
svc._directory = __dirname + "/yourdirectory/"
if (!fs.existsSync(svc._directory)){
fs.mkdirSync(svc._directory);
}
but i was wondering if there an option to create a new dir with node-windows? Thanks
This is just a wrapper for winsw so any options from one should be available from the other. Maybe some more context around your use case and a new issue?
I have a node.js socket IO server: socket-io-server.js
I installed multiple services of this script with node-windows with different names (i.e. "Socket IO Server Port 5001", "Socket IO Server Port 5002") using the same script (socket-io-server.js). That works.
If I uninstall the service "Socket IO Server Port 5002", it works actually, it's uninstalled (and the other service is still installed), but an error is thrown. Node-windows tries to delete also the log file of the other service which should not be touched...