Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ module.exports = function(PM2_HOME) {
BUILTIN_NPM_PATH : has_node_embedded === true ? p.resolve(__dirname, './node/bin/npm') : null,
};

if (process.platform === 'win32' ||
process.platform === 'win64') {
//@todo instead of static unique rpc/pub file custom with PM2_HOME or UID
pm2_file_stucture.DAEMON_RPC_PORT = '\\\\.\\pipe\\rpc.sock';
pm2_file_stucture.DAEMON_PUB_PORT = '\\\\.\\pipe\\pub.sock';
pm2_file_stucture.INTERACTOR_RPC_PORT = '\\\\.\\pipe\\interactor.sock';
};

// allow overide of file paths via environnement
var paths = Object.keys(pm2_file_stucture);
paths.forEach(function (key) {
Expand All @@ -79,13 +87,5 @@ module.exports = function(PM2_HOME) {
}
});

if (process.platform === 'win32' ||
process.platform === 'win64') {
//@todo instead of static unique rpc/pub file custom with PM2_HOME or UID
pm2_file_stucture.DAEMON_RPC_PORT = '\\\\.\\pipe\\rpc.sock';
pm2_file_stucture.DAEMON_PUB_PORT = '\\\\.\\pipe\\pub.sock';
pm2_file_stucture.INTERACTOR_RPC_PORT = '\\\\.\\pipe\\interactor.sock';
}

return pm2_file_stucture;
};