diff options
| author | Tom Harley | 2018-03-05 15:01:26 +0000 |
|---|---|---|
| committer | Tom Harley | 2018-03-05 15:01:26 +0000 |
| commit | c0463a2d7eefaab1f6dbf00843c8b3d2a53abb12 (patch) | |
| tree | 129d5084e76e7e992e3bd55cc03a4b5c955caabc /src/db/orm.ts | |
| parent | Add miniature response-wrapper middleware (diff) | |
| download | medicine-c0463a2d7eefaab1f6dbf00843c8b3d2a53abb12.tar.gz medicine-c0463a2d7eefaab1f6dbf00843c8b3d2a53abb12.zip | |
Introduce logging system
Diffstat (limited to 'src/db/orm.ts')
| -rw-r--r-- | src/db/orm.ts | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/db/orm.ts b/src/db/orm.ts index 01d8037..fd70fbb 100644 --- a/src/db/orm.ts +++ b/src/db/orm.ts @@ -1,12 +1,15 @@ +import { logQuery } from '../logger'; import { Sequelize } from 'sequelize-typescript'; const seq: Sequelize = new Sequelize({ - database: 'be4', - dialect: 'postgres', - username: 'admin', - password: '', - operatorsAliases: false, - modelPaths: [`${__dirname}/model`] + database: 'be4', + dialect: 'postgres', + username: 'admin', + password: '', + operatorsAliases: false, + modelPaths: [`${__dirname}/model`], + logging: logQuery, + benchmark: true }); export default seq; |
