index.js 272 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 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));