Skip to content
/ node-red-template Public template

Template to quickly start a new node-red project

Notifications You must be signed in to change notification settings

s1seven/node-red-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-red-template

This is a template for a Node-RED project meant to be run in local mode. The idea is to run an instance of Node-RED entirely from within a local directory to make it more portable. This also makes running multiple instances of Node-RED at the same time easier.

Node-RED will start with a blank canvas and will save the flow file to flows.json the first time a deploy is done. If you add your own flows.json file it will load that by default.

Usage

  1. Go to https://github.com/s1seven/node-red-template and click on Use this template.
  2. Clone your newly created repository
  3. Install dependencies (eg: npm install)
  4. Start Node-RED with npm start

When running multiple instances in parallel, you can specify a port:

npm start -- -p 1885

To run a specific flow file:

npm start -- testFlow.json

Dependencies

You can easily add third party nodes by modifying the package.json file. This template include the following dependencies:

Schema-tools

To use @s1seven/schema-tools-* packages in a Node-RED function, you can import them using global.get(<import-name>).

import name package
certificateSummary @s1seven/schema-tools-certificate-summary
extractEmails @s1seven/schema-tools-extract-emails
generateHtml @s1seven/schema-tools-generate-html
generatePdf @s1seven/schema-tools-generate-pdf
validateCertificate @s1seven/schema-tools-validate