postgres store for jsreport
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.eslintrc
.gitignore
.travis.yml
README.md
index.js
jsreport.config.js
package-lock.json
package.json

README.md

jsreport-postgres-store

NPM Version Build Status

jsreport template store extension allowing to persist data in PostgreSQL database

Installation

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.

Schema changes

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.

jsreport-core

You can apply this extension also manually to jsreport-core

var jsreport = require('jsreport-core')()
jsreport.use(require('jsreport-postgres-store')({ host: '...'}))