Something went wrong. Try again.
An attempt to showcase digitally, what's going-on at Inovus Labs. Something similar to Discord Rich Presence or Tinkerspace Digital live.inovuslabs.org
Something went wrong. Try again.
1234567891011121314151617181920
const mongoose = require('mongoose');require("dotenv").config()
module.exports = {
connect: () => { mongoose.connect(process.env.MONGODB_URL) .then(() => { console.log("\nConnected to MongoDB Atlas\n"); }).catch((error) => { console.log("\nError connecting to MongoDB Atlas\n", error); }); },
collection: (name) => { return mongoose.connection.db.collection(name); }
};