Hi all,
I would like to access Node-RED over a Unix Domain Socket, but the current implementation does not allow for this. Node.js' http(s) module has support for IPC (Net | Node.js v18.4.0 Documentation). I've played around with this a litte bit, and the following somewhat crude change did enable it, when placing a socket (like /var/run/node-red.sock
) in uiHost
configuration option of settings.js
> diff node_modules/.bin/node-red node-red.bck
440c440,445
< server.listen(settings.uiPort,settings.uiHost,function() {
---
> let args;
> if (settings.uiHost.startsWith('/'))
> args = [settings.uiHost];
> else
> args = [settings.uiPort, settings.uiHost];
> server.listen(...args,function() {
Has anyone tried something like this before? Is this possible out-of-the-box without any code changes?