node-red-contrib-routing

1.1.0 • Public • Published

node-red-contrib-routing

A Node-RED node to route incoming messages based on their topics.

It is inspired by Ruby on Rails' routing and Express.js' routing. It uses rlite to match a message to a single route.

Example

Routes
  • iot/:sensor/humidity
  • iot/:sensor/temperature
  • traffic
Incomming message
{
    "topic": "iot/AJ08/humidity",
    "payload": "18"
}

Output

Will match the route iot/:sensor/humidity and the forwarded message will be :

{
    "topic": "iot/AJ08/humidity",
    "payload": "18",
    "params": {
        "sensor": "AJ08"
    }
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    10
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    10
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i node-red-contrib-routing

Weekly Downloads

8

Version

1.1.0

License

Apache-2.0

Last publish

Collaborators

  • a.pultier