add auth-service not verified with Dockerfile

This commit is contained in:
vankhaiphan 2021-05-28 01:01:00 +02:00
parent 3a7389ba68
commit 8cf6520224
12 changed files with 304 additions and 0 deletions

View file

@ -0,0 +1,18 @@
const config = require('./config');
const MongoClient = require( 'mongodb' ).MongoClient;
const uri = config.mongodbHost;
let db;
module.exports = {
connectToServer: function( callback ) {
MongoClient.connect( uri, { useNewUrlParser: true, useUnifiedTopology: true }, function( err, client ) {
db = client.db(config.mongodbDatabase);
return callback( err );
});
},
getDB: function() {
return db;
}
};