Node-RED in Heroku

Node-RED in Heroku

A visual tool for wiring the Internet of Things

Node-RED provides a browser-based editor that makes it easy to wire together flows that can be deployed to the runtime in a single-click.

The version running here has been customised for the Heroku.

More information about Node-RED, including documentation, can be found at nodered.org.

Customising your instance of Node-RED

This template instance of Node-RED is enough to get you started creating flows.

You may want to customise it for your needs, for example replacing this introduction page with your own, adding http authentication to the flow editor or adding new nodes to the palette.

Password protect the flow editor

By default, the editor is open for anyone to access and modify flows. To password-protect the editor:

Add the following user-defined variables.

  • NODE_RED_USERNAME - the username to secure the editor with
  • NODE_RED_PASSWORD - the password to secure the editor with

Adding new nodes to the palette

  1. There is a growing collection of additional nodes that can be added to the Node-RED editor. You can search for available nodes in the Node-RED library.
  2. Edit the file package.json and add the required node package to the dependencies section. The format is:
    "node-red-node-package-name":"x.x.x"
    Where x.x.x is the desired version number.

Upgrading the version of Node-RED

  1. This boilerplate is configured to grab the latest stable release of Node-RED whenever the application is pushed into Heroku.

Changing the static web content

  1. The page you are reading now is served as static content from the application. This can be replaced with whatever content you want in the public directory.

Remove static web content and serve the flow editor from the root path

  1. In the file settings.js, delete the httpStatic and httpAdminRoot entries.