송민석

Make index.js and Test DB connection

Showing 1 changed file with 9 additions and 0 deletions
1 +const config =require('./config')
2 +const mongoose = require("mongoose");
3 +const connect = mongoose
4 + .connect(config.url, {
5 + useNewUrlParser: true,
6 + useUnifiedTopology: true,
7 + })
8 + .then(() => console.log("MongoDB Connected ..."))
9 + .catch((err) => console.log(err));
...\ No newline at end of file ...\ No newline at end of file