const { MongoClient } = require("mongodb");
const url = "mongodb://localhost:27017";
const db_name = "school";
const client = new MongoClient(url);
let config = async () =>{
let result = await client.connect();
let conn = result.db(db_name);
return conn.collection("students");
}
module.exports = config;
const url = "mongodb://localhost:27017";
const db_name = "school";
const client = new MongoClient(url);
let config = async () =>{
let result = await client.connect();
let conn = result.db(db_name);
return conn.collection("students");
}
module.exports = config;