Skip to content

Commit

Permalink
Fix mongoDB
Browse files Browse the repository at this point in the history
  • Loading branch information
PGamerX committed Mar 29, 2022
1 parent fdb8cb6 commit ecda57b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
11 changes: 8 additions & 3 deletions bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,14 @@ const mongoose = require("mongoose");
const dbURI = process.env.DBURI;

// noinspection JSCheckFunctionSignatures
mongoose.connect(dbURI).then((whatever) => {
console.log("owo did it work");
});
mongoose
.connect(dbURI, {
useNewUrlParser: true,
useUnifiedTopology: true,
})
.then(() => {
console.log("owo did it work");
});

// noinspection JSCheckFunctionSignatures

Expand Down
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ const dbURI = process.env.DBURI;

const mongoose = require("mongoose");
// noinspection JSCheckFunctionSignatures
mongoose.connect(dbURI).then((whatever) => {
console.log("owo did it work");
});
mongoose
.connect(dbURI, { useNewUrlParser: true, useUnifiedTopology: true })
.then((whatever) => {
console.log("owo did it work");
});

const manager = new ShardingManager("./bot.js", { token: token });

Expand Down

0 comments on commit ecda57b

Please sign in to comment.