Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
InventivetalentDev committed Oct 21, 2022
1 parent a442d12 commit 9bcb85e
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 137 deletions.
2 changes: 1 addition & 1 deletion db/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = function (mongoose, config) {
function connectMongo(mongoose, config) {
if (config.mongo.url) {
console.log("Connecting to mongodb...");
mongoose.connect(config.mongo.url, {useNewUrlParser: true, useUnifiedTopology: true});
mongoose.connect(config.mongo.url, {useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex: true, useFindAndModify: true});
} else {
console.log("Connecting to mongodb://" + ((config.mongo.user || "admin") + ":*****" + "@" + (config.mongo.address || "localhost") + ":" + (config.mongo.port || 27017) + "/" + (config.mongo.database || "database")));
mongoose.connect("mongodb://" + ((config.mongo.user || "admin") + ":" + (config.mongo.pass || "admin") + "@" + (config.mongo.address || "localhost") + ":" + (config.mongo.port || 27017) + "/" + (config.mongo.database || "database")));
Expand Down
Loading

0 comments on commit 9bcb85e

Please sign in to comment.