File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ require('dotenv').config();
33
44const MongoDB_USER = process . env . MongoDB_USER ;
55const MongoDB_PASSWORD = process . env . MongoDB_PASSWORD ;
6+ const MongoDB_URL = process . env . MongoDB_URL ;
67
78class MongoConnectionManager {
89 constructor ( url , options ) {
@@ -51,7 +52,7 @@ class MongoConnectionManager {
5152}
5253
5354// Example usage:
54- const mongoURL = `mongodb://${ MongoDB_USER } :${ MongoDB_PASSWORD } @15.207.51.198:27017 ` ;
55+ const mongoURL = `mongodb://${ MongoDB_USER } :${ MongoDB_PASSWORD } @${ MongoDB_URL } ` ;
5556const mongoOptions = { useNewUrlParser : true , useUnifiedTopology : true } ;
5657
5758const connectionManager = new MongoConnectionManager ( mongoURL , mongoOptions ) ;
@@ -68,4 +69,4 @@ async function connectToDatabase(databaseName) {
6869
6970module . exports = {
7071 connectToDatabase,
71- } ;
72+ } ;
You can’t perform that action at this time.
0 commit comments