This module provides the full Node-RED application, with both the runtime and editor components built in.
The API this module exposes allows it to be embedded within another node.js application.
httpAdmin : ExpressApplication
The express application for the Editor Admin API
httpNode : ExpressApplication
The express application for HTTP Nodes
nodes
This provides access to the internal nodes module of the runtime. The details of this API remain undocumented as they should not be used directly.
Most administrative actions should be performed use the runtime api under node-red.runtime.
server : HTTPServer
The HTTP Server used by the runtime
settings
This provides access to the internal settings module of the runtime.
init(httpServer, userSettings)
Initialise the Node-RED application.
Parameters:
Name | Type | Description |
---|---|---|
httpServer |
server
|
the HTTP server object to use |
userSettings |
Object
|
an object containing the runtime settings |
start() → {Promise}
Start the Node-RED application.
Returns:
- Type:
-
Promise
- resolves when complete
stop() → {Promise}
Stop the Node-RED application.
Returns:
- Type:
-
Promise
- resolves when complete
version() → {String}
Get the version of the runtime
Returns:
- Type:
-
String
- the runtime version