node-red

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.

Members

httpAdmin : ExpressApplication
httpNode : ExpressApplication
nodes
server : HTTPServer
settings
auth : { ... }
events : { ... }
hooks : { ... }
log : { ... }
runtime : { ... }
util : { ... }

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.

auth

The editor authentication api.

See:

events

Runtime events emitter

See:

hooks

Runtime hooks engine

See:

log

Logging utilities

See:

runtime

The runtime api

See:

util

General utilities

See:

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.

Once called, Node-RED should not be restarted until the Node.JS process is restarted.

Returns:
Type:
Promise
  • resolves when complete

version() → {String}

Get the version of the runtime

Returns:
Type:
String
  • the runtime version