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

@ -1,9 +1,13 @@
#!/usr/bin/env node
var pgp = require('pg-promise')()
var psqlUrl = require('../lib/options').postgresql
const path = require('path')
require('dotenv').config({ path: path.resolve(__dirname, '../.env') })
var db = pgp(psqlUrl)
var pgp = require('pg-promise')()
const { PSQL_URL } = require('../lib/constants')
var db = pgp(PSQL_URL)
db.manyOrNone(`select * from transactions where incoming=false
and stage='final_request' and authority='machine'`)