require() and execute nodejs code in Postgres with PLV8 and Fabrix. Depends on spool-knex.
$ npm install --save @fabrix/spool-plv8
// config/main.ts
import { PLV8Spool } from '@fabrix/spool-plv8'
import { KnexSpool } from '@fabrix/spool-knex'
export const main = {
spools: [
// ... other spools
KnexSpool,
PLV8Spool
]
}
// config/plv8.ts
export const plv8 = {
/**
* The name of the database store to use; must be defined in config.stores
*/
store: 'some-plv8-store'
}
MIT