Skip to content

Commit

Permalink
Merge pull request #120 from AsliSema/db-conn-deploy-test
Browse files Browse the repository at this point in the history
updating db conn
  • Loading branch information
nourkrimesh authored Aug 10, 2023
2 parents 61f1841 194e992 commit faf556b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/db/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 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;
}
console.log('1: trying to connect to database with connStr:', mongoURI);
if (mongoURI !== undefined) {
try {
Expand Down

0 comments on commit faf556b

Please sign in to comment.