January 2018
Intermediate to advanced
336 pages
7h 22m
English
To begin, create a directory called nodered to house your Node-RED-based code. Then open a terminal to this directory and create an initial package.json.
| | $ npm init -y |
Next, install the node-red package locally.
| | $ npm install --save --save-exact node-red@0.16.2 |
Then open your package.json in a text editor and add a start script to the scripts section like so:
| | "scripts": { |
| » | "start": "node-red -v -u ./config -f ./config/flows.json", |
| | "test": "echo \"Error: no test specified\" && exit 1" |
| | }, |
Here we’re specifying a couple of command-line arguments to the node-red command. The -v flag turns on verbose mode. The -u flag is short for --userDir and specifies a path to a directory ...
Read now
Unlock full access