-
Run the following command in your Node-RED user directory - typically
~/.node-red
npm install git+https://github.com/ChrisRahme/node-red-context-mongodb
-
Add a configuration in
settings.js
undercontextStorage
:contextStorage: { // ... mongodb: { module: require('node-red-context-redis'), config: { // see below options } } }
-
Restart Node-RED
These are the available options under config
and their default values:
config: {
host: '127.0.0.1' // hostname or IP address of the MongoDB server
port: '27017' // port of the MongoDB server
database: 'context' // name of the database
username: null // username for authentication
password: null // password for authentication
options: null // additional options for the driver as URL string
}