Skip to main content

Node-RED tutorials

Node-RED tutorials for FairCom Edge

Abstract

Node-RED works natively with the FairCom JSON DB API. It does not require a driver or custom-built nodes. Database capabilities to Node-RED are enabled by sending simple JSON commands to FairCom Edge

Node-RED works natively with the FairCom JSON DB API. It does not require a driver or custom-built nodes. Database capabilities to Node-RED are enabled by sending simple JSON commands to FairCom Edge.

Requirements:
Table 1. Quick links to FairCom's Node-RED Tutorials

Section

Description

Create session

Create a session with any of the FairCom JSON APIs. An authenticated session must be created before commands can be sent to a FairCom server.

Create table & index

Create a table and an index in a FairCom Edge database.

Add & query records

Insert and query records in a FairCom Edge database.



This FairCom tutorial uses HTTP to communicate with the server on port 8080. Because HTTP is insecure, this port is typically disabled.

Do the following to enable the HTTP protocol on port 8080:

  1. Shut down the FairCom server.

  2. Edit the services.json file located in the <faircom>/config folder.

  3. Find the listener service named "http8080".

  4. Change "enabled":false to "enabled":true.

  5. Restart the FairCom server.

The modified listener configuration object in services.json should look something like this:

{
  "serviceName": "http8080",
  "description": "Port 8080 using insecure HTTP protocol...",
  "port": 8080,
  "protocol": "http",
  "enabled": true
}