Fix database entity settings

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/6/head
trivernis 4 years ago
parent e1312d93bc
commit 449b6bd9ac
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -7,6 +7,7 @@ import { createConnection } from 'typeorm';
import { UserServerAPI } from './datasources/userserver/userserviceAPI';
import express from 'express';
import { requiredPermissions } from './datasources/userserver/permission';
import { CargoBike } from './model/CargoBike';
require('dotenv').config();
@ -39,7 +40,12 @@ async function authenticate (req: any, res: any, next: any) {
createConnection({
type: 'postgres',
url: process.env.POSTGRES_CONNECTION_URL
url: process.env.POSTGRES_CONNECTION_URL,
entities: [
CargoBike
],
synchronize: true,
logging: false
}).then(async () => {
console.log('connected to db');
}).catch(error => console.log(error));

Loading…
Cancel
Save