add read-only issue 4

Dave Conway-Jones 2018-03-28 13:41:35 +01:00
parent 53a1c9af2c
commit 8c623005fc
1 changed files with 2 additions and 0 deletions

@ -20,8 +20,10 @@ We can't quite do this today. Here are the missing pieces:
3. it must be possible to provide the credentialSecret for the project without it being part of any of the version controlled files. Options for this include:
- env var - `NODE_RED_CREDENTIAL_SECRET`
- command-line flag - `--credentialSecret="..."`
4. Must handle running in a read-only environment. If the package is installed globally (in order to insert a command link into /usr/bin) then the flow file and settings.js will be in root space - which ought not to be writable by the user. Currently even starting Node-RED with -u option pointing somewhere protected will fail. Options include - just handling the error. On error marking the settings.readOnly as true thus stopping the library failing. Setting disableEditor to true also.
The package would provide an npm start script that runs node-red with the appropriate command-line args.
It could also provide a `bin` section that could allow starting via command line if installed globally.
> DCJ: If you run the steps above then node-red and other modules will be installed *below* the CWD in node_modules... all good. If however we want to take our project dir and npm pack it... on re-installing it the project itself will also be in the node_modules dir thus making npm start (or pathing back to node-red) trickier.