I would like to ask.
I have file in C:\users\nxf68958\.Node-red\report.html
And when I would like to open this file by: localhost:1880/report.html I get: Cannot GET /report.html
in Log I have: "Nov 09:52:00 - [info] User directory : \Users\nxf68958\.node-red"
I am using: NR: 3.0.2 Node: 18.12.0
It worked perfectly on older versions of: NR: 2.2 and Node: 16.13. Then I actualized and it stopped working.
In settings.js is option: "fileWorkingDirectory" I tried to change it, but without change. What I am doing wrong?
Thank you
Node-RED will not serve static files by default, you have to explicitly enable it by settings the
httpStaticoption in thesettings.jsfile.Settings the
httpStaticvalue to point to theuserDir(which is what you have basically done by setting it to__dirname) is a bad idea from a security point of view because this means anybody can download yourflows.jsonandflows_creds.jsonfiles and the files likesettings.jsand.config.runtime.json(which holds the default encryption key for the creds file).fileWorkDirectoryis purely to set the default working directory for the code nodes that interact with the filesystem, it will have no effect on what files are served by the HTTP server.