此模块提供了一个 Express 应用程序,用于服务 Node-RED 编辑器。
它实现了 Node-RED HTTP 管理 API,编辑器使用该 API 与 Node-RED 运行时交互。
httpAdmin : ExpressApplication
用于服务 Node-RED 编辑器的 Express 应用程序
init(settings, _server, storage, runtimeAPI)
初始化模块。
参数
名称 | 类型 | 描述 |
---|---|---|
设置 |
对象
|
运行时设置 |
_server |
HTTPServer
|
HTTP 服务器实例 |
storage |
Storage
|
Node-RED 存储实例 |
runtimeAPI |
运行时
|
Node-RED 运行时实例 |
start() → {Promise}
启动模块。
返回
- 类型
-
Promise
当应用程序准备好处理请求时解析
stop() → {Promise}
停止模块。
返回
- 类型
-
Promise
当应用程序停止时解析