fix odl patches
[ccsdk/distribution.git] / dgbuilder / INSTALL.md
1 Node-RED Install
2 ================
3
4 ## Install node.js
5
6 You can get the latest version from <http://nodejs.org/download/>.
7
8 Or, you may want to use a version from your operating system's package manager:
9  <https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager>
10
11 ## Get Node-RED
12
13 Clone the repository from GitHub:
14
15     $ git clone git@github.com:node-red/node-red.git
16
17 ## Install the pre-requisite modules
18
19 From the top-level directory of Node-RED, run:
20
21     $ npm install
22
23 This will install the core pre-requisite modules.
24
25 ## Run Node-RED
26
27 From the top-level directory, run:
28
29     $ node red.js
30
31 You can then access Node-RED at <http://localhost:1880>.
32
33 Online documentation is available at <http://nodered.org/docs>.
34
35 ## Installing individual node dependencies
36
37 When Node-RED starts, it attempts to load the nodes from the `nodes/` directory.
38 Each will have its own set of dependencies that will need to be installed before
39 the node is available in the palette.
40
41 To help identify the dependencies, Node-RED logs any modules it fails to find
42 for a particular node. You don't have to install these unless you want or need
43 that node to appear.
44
45 Alternatively, a node's `.js` file can be examined to identify the modules it
46 explicitly requires. For example, the Twitter node is defined in
47 `nodes/social/27-twitter.js` and contains:
48
49         var RED = require("../../red/red");
50         var ntwitter = require('ntwitter');
51         var OAuth= require('oauth').OAuth;
52
53 Of these, `ntwitter` and `oauth` are neither built-in modules nor ones provided
54 by Node-RED itself. They can subsequently be installed by running:
55
56     $ npm install ntwitter oauth
57