Embedding express js inside node red

Is there any possibility to embed express js inside node red ? I know for the fact that its possible for node red to be included in any of our node projects. But what if due to some rare cases, I want to use express js in node red. is it possible ?

I'm not entirely clear what you mean.

Node-RED already uses express.js to serve all of its HTTP endpoints - both the admin endpoints and those created by the flow.

Any node or plugin has full access to the express app - RED.httpNode and RED.httpAdmin are the two express.js apps used.

thanks! this solves my query

Just to expand on Nicks answer. It is perfectly possible to add a new ExpressJS server to a Node-RED custom node. That can be useful if you need to be able to offer different settings/middleware than the 2 built-in ones.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.