A module to provide Node-RED persistence using a postgres database instead of the default filesystem
npm install node-red-contrib-storagemodule-postgres-yunzai js
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:
`sh
npm install node-red-contrib-storagemodule-postgres
``