feat: decouple l-s entrypoint

This commit is contained in:
Sérgio Salgado 2022-03-29 15:00:52 +01:00
parent 2a2c1fccc8
commit f4d6b5e454
48 changed files with 411 additions and 232 deletions

View file

@ -3,9 +3,13 @@
'use strict'
const pgp = require('pg-promise')()
const psqlUrl = require('../lib/options').postgresql
const db = pgp(psqlUrl)
const path = require('path')
require('dotenv').config({ path: path.resolve(__dirname, '../.env') })
const { PSQL_URL } = require('../lib/constants')
const db = pgp(PSQL_URL)
db.many('select data from user_config', 'exchanges')
.then(rows => {