diff --git a/ormconfig.json b/ormconfig.json deleted file mode 100644 index 250b347..0000000 --- a/ormconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "postgres", - "host": "127.17.42.1", - "port": 5432, - "username": "apollo", - "database": "apollo_test", - "synchronize": true, - "logging": false, - "entities": [ - "dist/model/**/*.js" - ] - } \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 1d0e8fb..cf9bdff 100644 --- a/src/index.ts +++ b/src/index.ts @@ -37,7 +37,10 @@ async function authenticate (req: any, res: any, next: any) { } } -createConnection().then(async () => { +createConnection({ + type: 'postgres', + url: process.env.POSTGRES_CONNECTION_URL +}).then(async () => { console.log('connected to db'); }).catch(error => console.log(error));