Created Design: Runnable Project (markdown)

Nick O'Leary 2018-03-20 22:29:00 +00:00
parent f6df575fa2
commit d52cd4b582
1 changed files with 24 additions and 0 deletions

@ -0,0 +1,24 @@
One of the goals of the Projects feature is to treat a project as a deployable artefact.
It should be possible to deploy a project without using the editor. For example:
```
1. git clone https://example.com/my-node-red-project.git
2. cd my-node-red-project
3. npm install
4. npm start -- --credentialSecret="my-secret-key"
```
### Missing pieces
We can't quite do this today. Here are the missing pieces:
1. the project's `package.json` needs to list `node-red` as a dependency. On balance, I think this is the right approach, rather than treat node-red as an assumed prerequisite. I don't think we should do this be default; maybe add a checkbox in the project settings' dependencies page to include `node-red`.
2. it must be possible to point node-red at a project on start-up, without using the editor to do so. Currently we overload the flowFile argument to set the active project - but that only works if the project is 'known'. It would be better to point at a `projectDir` wherever it may exist.
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="..."`
The package would provide an npm start script that runs node-red with the appropriate command-line args.