Skip to content

Commit

Permalink
changed uri to use env var
Browse files Browse the repository at this point in the history
  • Loading branch information
effy971 committed Oct 16, 2020
1 parent ff45131 commit c6a7e85
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions connectdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ const { MongoClient, Cursor } = require("mongodb");

module.exports = function () {
// Connection URI
const uri =
"mongodb+srv://effy:[email protected]/4learn?retryWrites=true&w=majority";
const uri = process.env.DB_CREDENTIALS;
// Create a new MongoClient
const client = new MongoClient(uri);

Expand Down

0 comments on commit c6a7e85

Please sign in to comment.