node-red-contrib-storagemodule-postgres-yunzai
v1.0.51
Published
A module to provide Node-RED persistence using a postgres database instead of the default filesystem
Downloads
68
Readme
node-red-contrib-storagemodule-postgres
A module to provide Node-RED persistence using a postgres database instead of the default filesystem.
More info here: Node-RED Storage API
How to use:
Add to your settings.js (normally found in '/home/yourHomeDirectory/.node-red/'):
storageModule: require("node-red-contrib-storagemodule-postgres"),
postgresURI: "postgres://username:password@postgressIP:5432/database",
postgresSchema: "public", //optional, defaults to the public schema
// Enable module reinstalls on start-up; this ensures modules installed post-deploy are restored after a restage
autoInstallModules: true,
userDir: '/home/yourHomeDirectory/.node-red/', //required to install nodes via the palette manager
In the same directory ('/home/yourHomeDirectory/.node-red/'), run:
npm install node-red-contrib-storagemodule-postgres
How it works:
This module creates 2 new tables in your postgres database:
- nodered
- noderedlibrary
Currently not implemented:
- sessions
- projects
- Doesn't log nicely, doesn't throw errors (just prints them)