# Embedding express js inside node red

**URL:** <https://discourse.nodered.org/t/embedding-express-js-inside-node-red/77452>\
**Category:** General\
**Created:** [11 April 2023 09:41 UTC](https://discourse.nodered.org/t/embedding-express-js-inside-node-red/77452 "2023-04-11T09:41:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![suraj\_k](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@suraj\_k](https://discourse.nodered.org/u/suraj_k)\
**Post date:** [11 April 2023 09:41 UTC](https://discourse.nodered.org/t/embedding-express-js-inside-node-red/77452/1 "2023-04-11T09:41:24Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [11 April 2023 09:44 UTC](https://discourse.nodered.org/t/embedding-express-js-inside-node-red/77452/2 "2023-04-11T09:44:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![suraj\_k](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@suraj\_k](https://discourse.nodered.org/u/suraj_k)\
**Post date:** [11 April 2023 09:52 UTC](https://discourse.nodered.org/t/embedding-express-js-inside-node-red/77452/3 "2023-04-11T09:52:38Z")

</div>

thanks! this solves my query

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 April 2023 16:53 UTC](https://discourse.nodered.org/t/embedding-express-js-inside-node-red/77452/4 "2023-04-11T16:53:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 April 2023 16:53 UTC](https://discourse.nodered.org/t/embedding-express-js-inside-node-red/77452/5 "2023-04-25T16:53:38Z")

</div>

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