aboutsummaryrefslogtreecommitdiff
path: root/src/db/orm.ts
diff options
context:
space:
mode:
authorTom Harley2018-02-08 15:02:10 +0000
committerTom Harley2018-02-08 15:02:10 +0000
commit3335f23194b90bffd534699b852322f5259ae693 (patch)
treeae570a7db012070fab11a37ae6304eac61660f8c /src/db/orm.ts
parentfurther work on ORM model (diff)
downloadmedicine-3335f23194b90bffd534699b852322f5259ae693.tar.gz
medicine-3335f23194b90bffd534699b852322f5259ae693.zip

should be almost functional now

Diffstat (limited to 'src/db/orm.ts')
-rw-r--r--src/db/orm.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/db/orm.ts b/src/db/orm.ts
new file mode 100644
index 0000000..300c90f
--- /dev/null
+++ b/src/db/orm.ts
@@ -0,0 +1,14 @@
+import { Sequelize } from 'sequelize-typescript';
+
+const seq = new Sequelize({
+ database: 'be4',
+ dialect: 'postgres',
+ username: 'admin',
+ password: 'eprprJacR0hBpmWvs5IDJZTnjRAY2gM3tSm0b1af',
+ storage: ':memory:',
+ operatorsAliases: false,
+ modelPaths: [__dirname + 'model']
+});
+
+seq.authenticate()
+ .then(() => console.log('Logged in!'));