This module provides the core runtime component of Node-RED. It does not include the Node-RED editor. All interaction with this module is done using the api provided.
flows
- addFlow( opts )
- deleteFlow( opts )
- getFlow( opts )
- getFlows( opts )
- getNodeCredentials( opts )
- setFlows( opts )
- updateFlow( opts )
nodes
- addModule( opts )
- getIcon( opts )
- getIconList( opts )
- getModuleCatalog( opts )
- getModuleCatalogs( opts )
- getModuleInfo( opts )
- getNodeConfig( opts )
- getNodeConfigs( opts )
- getNodeInfo( opts )
- getNodeList( opts )
- removeModule( opts )
- setModuleState( opts )
- setNodeSetState( opts )
projects
- abortMerge( opts )
- addRemote( opts )
- commit( opts )
- createProject( opts )
- deleteBranch( opts )
- deleteProject( opts )
- getActiveProject( opts )
- getBranches( opts )
- getBranchStatus( opts )
- getCommit( opts )
- getCommits( opts )
- getFile( opts )
- getFileDiff( opts )
- getFiles( opts )
- getProject( opts )
- getRemotes( opts )
- getStatus( opts )
- initialiseProject( opts )
- listProjects( opts )
- pull( opts )
- push( opts )
- removeRemote( opts )
- resolveMerge( opts )
- revertFile( opts )
- setActiveProject( opts )
- setBranch( opts )
- stageFile( opts )
- unstageFile( opts )
- updateProject( opts )
- updateRemote( opts )
settings
- generateUserKey( opts )
- getRuntimeSettings( opts )
- getUserKey( opts )
- getUserKeys( opts )
- getUserSettings( opts )
- removeUserKey( opts )
- updateUserSettings( opts )
init(settings, server, adminApi)
Initialise the runtime module.
Parameters:
Name | Type | Description |
---|---|---|
settings |
Object
|
the runtime settings object |
server |
HTTPServer
|
the http server instance for the server to use |
adminApi |
AdminAPI
|
an instance of @node-red/editor-api. TODO: This needs to be better abstracted. |
isStarted(opts) → {Promise.<Boolean>}
Returns whether the runtime is started
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
opts |
Object
|
|
Returns:
- Type:
-
Promise.<Boolean>
- whether the runtime is started
start() → {Promise}
Start the runtime.
Returns:
- Type:
-
Promise
- resolves when the runtime is started. This does not mean the flows will be running as they are started asynchronously.
stop() → {Promise}
Stops the runtime.
Returns:
- Type:
-
Promise
- resolves when the runtime is stopped.
version(opts) → {Promise.<String>}
Returns version number of the runtime
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
opts |
Object
|
|
Returns:
- Type:
-
Promise.<String>
- the runtime version number