Skip to content

Commit

Permalink
Changed MongoDB connecting string database URI.
Browse files Browse the repository at this point in the history
  • Loading branch information
jokwuoma committed Aug 16, 2024
1 parent 9911707 commit e888f0e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const csrfProtection = csrf({ cookie: true }); // enable this
app.use(csrfProtection); // enable this

// MongoDB connection string
process.env.MONGO_URI = "mongodb+srv://jokwuoma:[email protected]/?retryWrites=true&w=majority&appName=Cluster0";
process.env.MONGO_URI = "mongodb+srv://jokwuoma:[email protected]/";
const dbUri = process.env.MONGO_URI;

mongoose
Expand Down
2 changes: 1 addition & 1 deletion backend/populateDB.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const Question = require("./Question"); // Adjust the path as necessary to your
const { data } = require("./data"); // Adjust the path to where your data.js file is located

// Store my MongoDB connection string in the MONGO_URI environment variable to connect to the database
process.env.MONGO_URI = "mongodb+srv://jokwuoma:[email protected]/?retryWrites=true&w=majority&appName=Cluster0";
process.env.MONGO_URI = "mongodb+srv://jokwuoma:[email protected]/";
const mongoURI = process.env.MONGO_URI;
// const mongoURI = 'mongodb+srv://${username}:${password}@cluster0.3x0s7hh.mongodb.net/?appName=mongosh+2.1.5';

Expand Down
2 changes: 1 addition & 1 deletion kubernetes-manifest/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: quiz
type: Opaque
data:
mongo-uri: bW9uZ29kYitzcnY6Ly9qb2t3dW9tYTpOZlZrbUN4cVRLU0dVdzlpQGNsdXN0ZXIwLmMwN3I0Lm1vbmdvZGIubmV0Lz9yZXRyeVdyaXRlcz10cnVlJnc9bWFqb3JpdHkmYXBwTmFtZT1DbHVzdGVyMA==
mongo-uri: bW9uZ29kYitzcnY6Ly9qb2t3dW9tYTpOZlZrbUN4cVRLU0dVdzlpQGNsdXN0ZXIwLmMwN3I0Lm1vbmdvZGIubmV0Lw==
# my own encoded MongoDB connection string is shown above
# mongo-uri: bW9uZ29kYitzcnY6Ly9xdWl6X3VzZXI6M1BiMHprZDZjMEFJWkVyRUBjbHVzdGVyMC4zeDBzN2hoLm1vbmdvZGIubmV0Lz9hcHBOYW1lPW1vbmdvc2grMi4xLjU=
# mongo-uri listed above this line is prior user's encoded connecting string

0 comments on commit e888f0e

Please sign in to comment.