File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,11 @@ let db;
36
36
mongoose . Promise = global . Promise ;
37
37
38
38
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
41
41
} 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
44
44
}
45
45
46
46
const Book = require ( './models/bookModel' ) ; // We get the mongoose schema to work with it.
You can’t perform that action at this time.
0 commit comments