Web Application
Common
Use setup
method to init oor
at application start.
Fastify
We provider a plugin in fastify, located at oor/plugins
:
import OOR from 'oor/plugins/fasfity-pg';
fastify.register(OOR, {
host: CONFIG.PG_HOST,
port: CONFIG.PG_PORT,
user: CONFIG.PG_USER,
password: CONFIG.PG_PASS,
database: CONFIG.PG_DB,
});
// can also es/mysql :
// import OOR from 'oor/plugins/fasfity-mysql';
// import OOR from 'oor/plugins/fasfity-es';