Skip to content

Commit 18fef40

Browse files
committed
2 parents b42dc50 + da2cd04 commit 18fef40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server-mongo/app.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ let db;
3636
mongoose.Promise = global.Promise;
3737

3838
if(process.env.ENV === 'Test') {
39-
db = mongoose.connect('mongodb://localhost/bookAPI_test'); // Our database is going to connect here in tests environment
40-
//db = mongoose.connect(`mongodb://${process.env.ENVIRONMENT}/bookAPI_test`); // Our database is going to connect here in tests environment
39+
// db = mongoose.connect('mongodb://localhost/bookAPI_test'); // Our database is going to connect here in tests environment
40+
db = mongoose.connect(`mongodb://${process.env.ENVIRONMENT}/bookAPI_test`); // Our database is going to connect here in tests environment
4141
} else {
42-
db = mongoose.connect('mongodb://localhost/bookAPI'); // Local
43-
// db = mongoose.connect(`mongodb://${process.env.ENVIRONMENT}/bookAPI`); // docker
42+
// db = mongoose.connect('mongodb://localhost/bookAPI'); // Local
43+
db = mongoose.connect(`mongodb://${process.env.ENVIRONMENT}/bookAPI`); // docker
4444
}
4545

4646
const Book = require('./models/bookModel'); // We get the mongoose schema to work with it.

0 commit comments

Comments
 (0)