require() and execute nodejs code in Postgres with PLV8 and Trails. Depends on trailpack-knex.
$ npm install --save trailpack-plv8
// config/main.js
module.exports = {
packs: [
// ... other trailpacks
require('trailpack-plv8')
]
}
// config/plv8.js
module.exports = {
/**
* The name of the database store to use; must be defined in config.database.stores
*/
store: 'some-plv8-store'
}
MIT