⚠️ This repository has been moved to the monorepo jsreport/jsreport
jsreport template store extension allowing to persist data in PostgreSQL database
npm install jsreport-postgres-store
Then alter jsreport configuration
{
"store": {
"provider": "postgres"
},
"extensions": {
"postgres-store": {
"host": "localhost",
"port": 5433,
"database": "jsreport",
"user": "postgres",
"password": "password"
}
}
}
After jsreport initializes you should see tables like jsreport.TemplateType
and other in jsreport
database.
If you do changes to the database schema by enabling additional extensions you need to drop the affected tables and let jsreport to reinitialize them.
You can apply this extension also manually to jsreport-core
var jsreport = require('jsreport-core')()
jsreport.use(require('jsreport-postgres-store')({ host: '...'}))