Showing
1 changed file
with
9 additions
and
0 deletions
index.js
0 → 100644
| 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 |
-
Please register or login to post a comment