# How to Use HTTP-In Nodes in Node-RED to Serve Static HTML Pages Instead of Separate Express Code

**URL:** <https://discourse.nodered.org/t/how-to-use-http-in-nodes-in-node-red-to-serve-static-html-pages-instead-of-separate-express-code/93434>\
**Category:** General\
**Created:** [25 November 2024 09:15 UTC](https://discourse.nodered.org/t/how-to-use-http-in-nodes-in-node-red-to-serve-static-html-pages-instead-of-separate-express-code/93434 "2024-11-25T09:15:48Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [25 November 2024 11:24 UTC](https://discourse.nodered.org/t/how-to-use-http-in-nodes-in-node-red-to-serve-static-html-pages-instead-of-separate-express-code/93434/9 "2024-11-25T11:24:51Z")

</div>

you have two choices:

1. server static css via an http-in/http-response nodes (see flow above)
2. use the Node-RED static directory - no idea how to do that

For two, check the settings.js file -

```auto
    /** When httpAdminRoot is used to move the UI to a different root path, the
     * following property can be used to identify a directory of static content
     * that should be served at http://localhost:1880/.
     * When httpStaticRoot is set differently to httpAdminRoot, there is no need
     * to move httpAdminRoot
     */
    //httpStatic: '/home/nol/node-red-static/', //single static source
    /* OR multiple static sources can be created using an array of objects... */
    //httpStatic: [
    // {path: '/home/nol/pics/', root: "/img/"},
    // {path: '/home/nol/reports/', root: "/doc/"},
    //],

```

that's what I found in the settings.js ...

---

_[View the full topic](https://discourse.nodered.org/t/how-to-use-http-in-nodes-in-node-red-to-serve-static-html-pages-instead-of-separate-express-code/93434)._
