Skip to content

Commit

Permalink
devex-apollo local files
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Aug 16, 2023
1 parent 4cc0b0d commit d01f60a
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions products/devex-apollo/config/config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
//import fs from "fs";

let config;

if (process.env.NODE_ENV === "dev") {
config = {
dbUrl: `mongodb://${process.env.DOCUMENTDB_USER}:${process.env.DOCUMENTDB_PASSWORD}@${process.env.DOCUMENTDB_HOST}:${process.env.DOCUMENTDB_PORT}/${process.env.DOCUMENTDB_DB}?authSource=${process.env.DOCUMENTDB_DB}&readPreference=primary&appname=MongoDB%20Compass%20Community&ssl=false`,
// dbUrl: `mongodb://${process.env.DOCUMENTDB_USER}:${process.env.DOCUMENTDB_PASSWORD}@${process.env.DOCUMENTDB_HOST}:${process.env.DOCUMENTDB_PORT}/${process.env.DOCUMENTDB_DB}?authSource=admin&readPreference=primary&appname=MongoDB%20Compass%20Community&ssl=false`,
mongooseOpts: {
useUnifiedTopology: true,
useNewUrlParser: true,
useCreateIndex: true,
},
};
} else {
// let CA;
// try {
// CA = fs.readFileSync("./rds-combined-ca-bundle.pem");
// } catch (e) {
// console.log("Missing CA .pem in root");
// }

const documentDbConf =
"?authSource=" + process.env.DOCUMENTDB_DB + "&replicaSet=rs0";
// "?ssl=true&ssl_ca_certs=rds-combined-ca-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false";

config = {
database: process.env.DOCUMENTDB_DB,
Expand All @@ -31,7 +20,6 @@ if (process.env.NODE_ENV === "dev") {
useUnifiedTopology: true,
useNewUrlParser: true,
useCreateIndex: true,
// sslCA: [CA],
},
};
}
Expand Down

0 comments on commit d01f60a

Please sign in to comment.