lamassu-server/tools/check-user-count.js
Sérgio Salgado bd82285ecf feat: lamassu initial dockerize approach
feat: improve dockerization

feat: finished initial versions of dockerfiles

fix: small fixes to image building
2022-04-05 23:10:46 +01:00

15 lines
325 B
JavaScript

#!/usr/bin/env node
const path = require('path')
require('dotenv').config({ path: path.resolve(__dirname, '../.env') })
const db = require('../lib/db')
const getCount = () => {
return db.one(`SELECT COUNT(*) FROM users`)
.then(res => {
process.stdout.write(res.count)
process.exit(0)
})
}
getCount()