3 const DB
= require('../src/db');
4 const Logger
= require('../src/logger');
5 const Config
= require('../config');
6 const config
= new Config(process
.env
.NODE_ENV
);
8 const logger
= new Logger(config
);
9 const db
= new DB(logger
, config
);
12 const identifier
= process
.argv
[2];
15 console
.log('missing user');
16 throw new Error('missing argument');
20 await db
.initialize();
21 await db
.context(async (dbCtx
) => {
22 const user
= await db
.authenticationGet(dbCtx
, identifier
);
24 const profiles
= await db
.profilesByIdentifier(dbCtx
, identifier
);
25 console
.log(profiles
);
27 console
.log('(user does not exist)');
31 await db
._closeConnection();