Reading the github readme I was under the impression that flow can't be modified (even at runtime)
You're tasked by your client to design a dashboard that takes input from a user, and it gets processed with your magic sauce/IP. There will be some level of code (or all of it), that you don't want to reveal or be messed with.
Perhaps this can be altered in some way, I'm not that familiar with core node-red procedures, otherwise maybe mention this in readme, so someone would not be under the same impressions and want to deploy this somewhere thinking no one can alter the flow.
If a flow is not embedded, the SFE will create a directory called NRUserDir on startup if it's not already been created. This allows you to deploy the executable with a modifiable flow (but note: this also allows you to view the flow code)
but yes - I should make it more clear - thanks for the feedback
If a flow is not embedded, the SFE will create a directory called NRUserDir on startup if it's not already been created. This allows you to deploy the executable with a modifiable flow (but note: this also allows you to view the flow code)
But I did embed the flow.
The final executable will contain an embedded file system, which is read only. Therefore, if you do not block access to the Editor (disableEditor ) and try to deploy (or install Nodes) after, it will fail.
It's true I can't seem to install new nodes, but I can deploy the changes and also disabling the panel does not prevent me to add new ones or add flows - all that can be done through UI or action panel which is available.
I'm not criticizing, just seems that readme is a bit confusing.
Providing you embed a flow, and disable the editor : disableEditor: true - the flow becomes difficult to reverse engineer - given its embedded and the editor is fully disabled
Yea I didn't set this: disableEditor: true - now this is the flow I was expecting!
And because I never disabled editor before in node-red I thought this was on by default, seeing those disabled panels and deploy button (that don't do anything btw except confuse people like me )
Sure, and feel free to put it in build configuration if you think it should be optional. I didn't want to put in in settings.js as that is nr specific.
Hello, my initial request was to add parameter to settings.js file:
/* Change me */
credentialSecret: '#########################',
/* This should be set to true, JUST BEFORE compiling to an SFE */
/* But it will be ignored (forcibly set to false) during the development stage */
disableEditor: false,
autostartDashboard: false, <- new parameter to autostart dashboard
but your PR changes seems to be easy to modify for my needs:
Using the contribution from @ziga.
I have now merged some changes, with the following effect.
if a file named AUTOLOAD (no file extension) is found in the same location as the executable, it will load up the URL inside of it. (regardless of disableEditor, or mode)
if begins with / - will append the URL to the admin endpoint (example : /dashboard)
If has an absolute URL (http://...) - will load up that URL.
See the table below
Mode
disableEditor
AUTOLOAD Found
Auto Loaded URL
Editor Possible
Design Time
N/A
N/A
Editor
YES
Run Time
TRUE/FALSE
YES
From File
IF ALLOWED
Run Time
TRUE/FALSE
NO
—————
IF ALLOWED
Have also bumped a few dependencies
Please do let me know how this gets on - I have done minimal testing.
One more request:
in the same manner that you have done AUTOLOAD,
would it be possible to copy/paste external file folder that are in "Node-RED-SFE-main" directory?
If directory "files" (or whatever) exists copy it with all contents to build/dist?
Thanks for a reply, my use case is that I plan to distribute SFE with external files which engineer has to modify to his use case. These files are basically templates... I just use local filesystem
Every time I create a new build - dist folder is cleared. "files" folder is removed so I just have to copy/paste from develop environment
honestly, didn't work with httpStatic before, I though it was a way to store your images and etc, for dashboard purposes