Installation
npm install koa-orm
Example
Single database
const path = const config = modelPath: path migrationPath: path db: 'db_test' username: 'postgres' options: dialect: 'postgres' logging: true password: 'pass' host: '127.0.0.1' port: 5432 appcontextdb = await config app
Multiple database
const join = joinconst configs = modelPath: path migrationPath: path db: 'cohort' username: 'postgres' options: dialect: 'postgres' logging: true password: 'pass' host: '127.0.0.1' port: 5432 modelPath: path migrationPath: path db: 'location' username: 'postgres' options: dialect: 'postgres' logging: true password: 'pass' host: '127.0.0.1' port: 5432 appcontextdb = await config app
API
await modeLoader(configs)
configs
: Multi database config array.
yarn add model-loader@latest