|
|
|
@ -21,7 +21,9 @@ var termination = chalk.bold.magenta;
|
|
|
|
|
// TODO
|
|
|
|
|
// Need to read database url from a environment variable.
|
|
|
|
|
// const databaseURL = "mongodb://armintatankdbuser:armintatank1@35.207.198.4:27017/arminta-tank-db;
|
|
|
|
|
const databaseURLNew = "mongodb://35.207.198.4:27017/arminta-tank-db";
|
|
|
|
|
//const databaseURLNew = "mongodb://35.207.198.4:27017/arminta-tank-db";
|
|
|
|
|
const databaseURLNew = "mongodb://35.200.129.165:27017/health-care-db";
|
|
|
|
|
|
|
|
|
|
// const databaseURLNew = "mongodb://127.0.0.1:27017/arminta-tank-db";
|
|
|
|
|
// Next line not used , or no need to pass default db in the mongo connection url.
|
|
|
|
|
const defaultDatabase = "arminta-tank-db";
|
|
|
|
@ -30,7 +32,9 @@ const defaultDatabase = "arminta-tank-db";
|
|
|
|
|
|
|
|
|
|
async function dbConnection() {
|
|
|
|
|
try {
|
|
|
|
|
db.connect(databaseURLNew, { user: "armintatankdbuser", pass: "armintatank1" , useUnifiedTopology: true, });
|
|
|
|
|
// db.connect(databaseURLNew, { user: "armintatankdbuser", pass: "armintatank1" , useUnifiedTopology: true, });
|
|
|
|
|
db.connect(databaseURLNew, { user: "healthcaredbuser01", pass: "healthcare01" , useUnifiedTopology: true, });
|
|
|
|
|
|
|
|
|
|
// db.connect(databaseURLNew)
|
|
|
|
|
db.connection.on("connected", function () {
|
|
|
|
|
console.log(
|
|
|
|
|