Node RED plugin to hold context in PostgreSQL.
PostgreSQL server: https://www.postgresql.org
Run the following in you Node RED user directory (usually ~/.node-red
)
npm install @zigasebenik/node-red-context-postgresql
Open Node RED settings.js
file and look for contextStorage
, then reference and configure installed plugin:
contextStorage: {
postgresql: {
module: require('@zigasebenik/node-red-context-postgresql'),
config: {
connectionString: 'postgres://localhost:5432/nodered',
tableName: 'nodered'
}
}
}
For more PostgreSQL options look here.
Plugin provides async context storage, thus refer to Node RED documentation on how to use async context storage in a function node.
General Node RED context documentation can be found here.