0.0.6 • Published 4 years ago

node-red-cli-tool v0.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Node Red Tool

This is a CLI tool for managing node-red flows and storing them in a VCS like git.

Terminology

  • The serverId is the id of the target server.
  • The projectId is the id of the project.
  • The flowId is the id of the flow. It is stored in the text description of the flow.

Usage

Setup

  1. npm i -g node-red-cli-tool
  2. Create a credentials file named 'node-red.credentials.json' in your project directory with the following template and replace the placeholders:
{
  "<serverId>": {
    "projects": {
      "<projectId>": {
        "url": "<url>",
        "username": "<username>",
        "password": "<password>"
      }
    }
  }
}
  1. Create a project file named 'node-red.config.json' in the '{{projectId}}' directory in your project directory with the following template and replace the placeholders:
{
  "id": "<projectId>",
  "flowFile": "flow.json",
  "flowTextId": "<flowId>",
  "stages": {
    "<stageKey>": "<serverId>"
  },
  "functionsDir": "functions",
  "functionBindings": [
    {
      "functionFileName": "<some_function_file_name_1.js>"
      "functionId": "001"
    },
    {
      "functionFileName": "<some_function_file_name_2.js>"
      "functionId": "002"
    }
  ]
}

Commands

NameBefehlBeschreibung
Fetchnode-red-tool fetch Loads the flow file for Subprojects' flow
Extractnode-red-tool extract Extracts the functions of the flow file to the function files
Buildnode-red-tool build <subProjectDirCopies the functions of the functions files in the flow file
Deploynode-red-tool deploy Deploys the flow file to the specified server
Cleannode-red-tool clean Removes all functions bodies from the local flow file
0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago