Hi @bakman2,
Yes you can
But there are a few things to watch for and do.
-
You wont be able to make changes to the flow, trying to
deploy will complain of a Read Only File System (See my image) -
You need to set the flows file and settings file as augments, when running the executable
-
The virtual file system starts at
/snapshot/<Folder-Name>
orc:\snapshot\<Folder-Name>
for win
With all that in mind...
Lets assume we are working in a directory called NR
-
The folder in which you installed Node RED (I.e your working directory) add a folder of say config
-
Add this folder to the assets section of package.json
"pkg":{
"assets": ["./node_modules/**/*.*", "./config/**/*.*"]
},
-
Start node red normally to create your flows,
BUT pass in an arg of--userDir <Location of Config Dir>
-
Run the normal pkg command
Now then.....
To run the executable and have it use the embedded settings file and flows....
Node-RED-Executable --settings /snapshot/NR/config/settings.js /snapshot/NR/config/flows.json
Note: you will still need to set a userDir
or let it use default, as Node RED will try and create it each time, and if setting userDir
to an embdded location, it will crash trying to create the Dir