posting and commenting
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const mongo = require('mongodb');
|
||||
const MongoClient = mongo.MongoClient;
|
||||
const ObjectID = mongo.ObjectID;
|
||||
const DBName = "EMI_SOCIAL";
|
||||
const mongoUrl = process.env.MONGO_URL;
|
||||
const postDB = require("./dbTools/post.js");
|
||||
@@ -11,6 +12,7 @@ const getDB = new Promise((resolve, reject) => {
|
||||
if (err) return reject(err);
|
||||
|
||||
DB.db = db;
|
||||
DB.ObjectID = ObjectID;
|
||||
console.log("Connected to DB!");
|
||||
DB.usersCol = db.db(DBName).collection("users");
|
||||
DB.tokensCol = db.db(DBName).collection("tokens");
|
||||
|
||||
Reference in New Issue
Block a user