Skip to content

Commit

Permalink
Merge branch 'main' into fronend-update-links
Browse files Browse the repository at this point in the history
  • Loading branch information
nourkrimesh authored Aug 10, 2023
2 parents 39363ea faf556b commit 33d7f61
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/db/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 6,12 @@ import mongoose, { ConnectOptions } from 'mongoose';
const connectToDatabase = async () => {
let mongoURI;

if (config.environment === 'development') {
mongoURI = config.mongo.devDB.url;
} else if (config.environment === 'test') {
if (config.environment === 'test') {
mongoURI = config.mongo.testDB.url;
}

else {
mongoURI = config.mongo.devDB.url;
}
if (mongoURI !== undefined) {
try {
await mongoose.connect(mongoURI, {
Expand Down

0 comments on commit 33d7f61

Please sign in to comment.