Node-RED 项目教程

Node-RED 项目教程

node-redLow-code programming for event-driven applications项目地址:https://gitcode.com/gh_mirrors/no/node-red

1. 项目的目录结构及介绍

Node-RED 项目的目录结构如下:

node-red/
├── .github/
├── .vscode/
├── conf/
├── docs/
├── examples/
├── lib/
├── node_modules/
├── nodes/
├── red/
├── settings/
├── test/
├── tools/
├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .npmignore
├── .prettierignore
├── .prettierrc
├── .travis.yml
├── AUTHORS
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── README_zh-CN.md
├── babel.config.js
├── build.js
├── docker-compose.yml
├── gulpfile.js
├── jsdoc.conf.json
├── package.json
├── tsconfig.json
└── tslint.json

目录介绍

  • .github/: GitHub 相关的配置文件。
  • .vscode/: Visual Studio Code 的配置文件。
  • conf/: 配置文件目录。
  • docs/: 文档目录。
  • examples/: 示例文件目录。
  • lib/: 库文件目录。
  • node_modules/: 依赖模块目录。
  • nodes/: 节点目录。
  • red/: 核心代码目录。
  • settings/: 设置文件目录。
  • test/: 测试文件目录。
  • tools/: 工具目录。
  • .editorconfig: 编辑器配置文件。
  • .eslintignore: ESLint 忽略配置。
  • .eslintrc.js: ESLint 配置文件。
  • .gitignore: Git 忽略配置。
  • .npmignore: npm 忽略配置。
  • .prettierignore: Prettier 忽略配置。
  • .prettierrc: Prettier 配置文件。
  • .travis.yml: Travis CI 配置文件。
  • AUTHORS: 作者列表。
  • CHANGELOG.md: 更新日志。
  • CONTRIBUTING.md: 贡献指南。
  • LICENSE: 许可证文件。
  • README.md: 项目说明文档。
  • README_zh-CN.md: 中文项目说明文档。
  • babel.config.js: Babel 配置文件。
  • build.js: 构建脚本。
  • docker-compose.yml: Docker 配置文件。
  • gulpfile.js: Gulp 配置文件。
  • jsdoc.conf.json: JSDoc 配置文件。
  • package.json: 项目依赖和脚本配置。
  • tsconfig.json: TypeScript 配置文件。
  • tslint.json: TSLint 配置文件。

2. 项目的启动文件介绍

Node-RED 的启动文件是 node-red/red/cli.js。这个文件是 Node-RED 的命令行接口,用于启动 Node-RED 服务。

启动命令

node red/cli.js

3. 项目的配置文件介绍

Node-RED 的配置文件是 node-red/settings/settings.js。这个文件包含了 Node-RED 的各种配置选项,如端口、认证、日志等。

配置文件示例

module.exports = {
    httpAdminRoot: "/",
    httpNodeRoot: "/api",
    userDir: "/home/nol/.node-red/",
    functionGlobalContext: {
        // 全局上下文
    },
    editorTheme: {
        // 编辑器主题
    },
    logging: {
        // 日志配置
    }
};

配置项介绍

  • httpAdminRoot: 管理界面的根路径。
  • httpNodeRoot: 节点接口的根路径。
  • userDir: 用户目录。
  • functionGlobalContext: 全局上下文。
  • editorTheme: 编辑器主题。
  • logging: 日志配置。

以上是 Node-RED 项目的目录结构、启动文件和配置文件的介绍。希望这份教程能帮助你更好地理解和使用 Node-RED。

node-redLow-code programming for event-driven applications项目地址:https://gitcode.com/gh_mirrors/no/node-red

  • 5
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

翁晔晨Jane

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值