node-red/node-red-nodegen

Name: node-red-nodegen

Owner: node-red

Description: null

Created: 2017-12-04 13:33:35.0

Updated: 2018-05-21 09:36:12.0

Pushed: 2018-05-21 09:36:11.0

Homepage: null

Size: 74

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Node generator for Node-RED

Install node generator globally to make the node-red-nodegen command available on your path:

npm install -g git+http://github.com/node-red/node-red-nodegen.git

You may need to run this with sudo, or from within an Administrator command shell.

Usage
Usage:
   node-red-nodegen <source file or URL> [-o <path to save>] [--prefix <prefix string>] [--name <node name>] [--module <module name>] [--version <version number>] [--tgz] [--help]

Description:
   Node generator for Node-RED

Supported source:
   - Function node (js file in library, "~/.node-red/lib/function/")
   - Swagger definition

Options:
   -o : Destination path to save generated node (default: current directory)
   --prefix : Prefix of npm module (default: "node-red-contrib-")
   --name : Node name (default: name defined in source)
   --module : Module name (default: "node-red-contrib-<node name>")
   --version : Node version (format: "number.number.number" like "4.5.1")
   --tgz : Save node as tgz file
   --help : Show help
Example 1. Create original node from function node (JavaScript code)

-> You can use lower-case node on Node-RED flow editor.

Example 2. Create original node from Swagger definition

-> You can use swagger-petstore node on Node-RED flow editor.

Note: Currently node generator supports GET and POST methods using JSON format without authentication.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.