Hello everyone, im trying to deploy Node-red on render.com at free instance as web service, using as source github repository (GitHub - yarickshark/Node-red), but i cant set authorization. I just uncommented part of "settings.js" - adminAuth.
Deployed same files locally on pc with windows - everything work as it should (authorization works). When i do the same deploying at render - there is no authorization, just node-red web.
How to make authorization work?
Installed node.js, installed node-red on pc (C:...), started, set auth.
Copied to D:..., made a local repo from copy, pushed to github. At render set repo to use for deploy, and its live, but without auth
I edited setings.js in browser in repo (that one, which not at folder, at pc it must be in .node-red folder), and than rebuint it at render (that must reload all files before deploy)
I meant that you should look at the file /opt/render/.node-red/settings.js when node-red has started and check that it contains the admin auth changes.
If you look on GitHub under my id, you will find an alternate installer for Node-RED that will do what you need. You don't have to run it if you don't want to but you can borrow the process and adapt for your own needs.
Instead of the "normal" install of Node-RED - which installs to a global location, you install it to a local folder and create a userDir folder inside that (userDir is where the settings and flows all go). That way, you have everything in a single parent folder.
You create a script entry in the parent package.json file so that npm start will run Node-RED directly which matches the instructions for running custom node.js apps from the render.com docs. You can use this as your start script (assumes that userDir will be in the data sub-folder, adjust as needed: