12 lines
381 B
JavaScript
12 lines
381 B
JavaScript
|
const mongoose = require("mongoose");
|
||
|
const config = require("./config");
|
||
|
|
||
|
mongoose.connect("mongodb+srv://MasonmMasonn:Masonn14@galaxies.b117q.mongodb.net/myFirstDatabase?retryWrites=true&w=majority", {
|
||
|
useNewUrlParser: true,
|
||
|
useUnifiedTopology: true,
|
||
|
});
|
||
|
mongoose.connection.on("connected", () => {
|
||
|
console.log("[✅ Datenbank] Connected!");
|
||
|
});
|
||
|
module.exports = mongoose;
|