Search code examples
node.jsnode-red

node-RED port number


Can we set port number of node-RED is same with another port number? ex: test.js is running on 1880 port number, and then node-RED port number is 1880 too. but httpRoot will be actived,so when I run the node-RED, I use 127.0.0.1:1880/red. Is it possible? Thank you


Solution

  • No, two applications can not share a port like this directly.

    You could use something like nginx running on port 1880 and run test.js and Node-RED on different ports and have nginx proxy requests to the separate applications.

    Or you could look at the documentation for embedding Node-RED and include Node-RED into your test.js application.