Something went wrong. Try again.
A project designed to automate the process of fetching result screenshots from the MGU result portal, sending them to students via email as…
Something went wrong. Try again.
1234567891011121314151617const chalk = require('chalk');const mongoose = require('mongoose');
module.exports = { connect: () => { mongoose.connect(process.env.MONGO_URL, { useNewUrlParser: true, useUnifiedTopology: true }) .then(() => { console.log(chalk.cyanBright("--- Connected to MongoDB Atlas\n")); }).catch((error) => { console.log(error); }); },
collection: (name) => { return mongoose.connection.db.collection(name); }};