fix: add environment helper file

This commit is contained in:
Sérgio Salgado 2022-05-13 16:27:18 +01:00
parent fb4cbfa331
commit 70da7d0677
18 changed files with 21 additions and 52 deletions

View file

@ -4,10 +4,7 @@
const pgp = require('pg-promise')()
const os = require('os')
const path = require('path')
require('dotenv').config({ path: process.env.NODE_ENV === 'production' ? path.resolve('/etc', 'lamassu', '.env') : path.resolve(__dirname, '../.env') })
require('../lib/environment-helper')
const { PSQL_URL } = require('../lib/constants')
const db = pgp(PSQL_URL)