Skip to content

Commit

Permalink
Use env variables for mongodb connection url
Browse files Browse the repository at this point in the history
  • Loading branch information
yash22arora committed May 17, 2024
1 parent 94330a6 commit 2f53092
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const domainRoutes = require("./api/routes/domain");

mongoose
.connect(
`mongodb+srv://yash22arora:${process.env.MONGODB_PASSWD}@servdomain.e6tn8tj.mongodb.net/?retryWrites=true&w=majority`
`mongodb+srv://${MONGODB_USERNAME}:${process.env.MONGODB_PASSWD}@${process.env.MONGODB_CLUSTER}.mongodb.net/?retryWrites=true&w=majority`
)
.then(() => {
console.log("Connected to database 🚀");
Expand Down

0 comments on commit 2f53092

Please sign in to comment.