index.js 272 Bytes
const config =require('./config')
const mongoose = require("mongoose");
const connect = mongoose
  .connect(config.url, {
    useNewUrlParser: true,
    useUnifiedTopology: true,
  })
  .then(() => console.log("MongoDB Connected ..."))
  .catch((err) => console.log(err));