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

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 -

    /** 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 ...