diff --git a/template.js b/template.js index 2785d10..a5decbd 100644 --- a/template.js +++ b/template.js @@ -1,11 +1,14 @@ const { MongoClient } = require('mongodb'); +const username = encodeURIComponent("userName"); +const password = encodeURIComponent("password"); +const cluster = "your-cluster-url"; async function main() { /** * Connection URI. Update , , and to reflect your cluster. * See https://docs.mongodb.com/drivers/node/ for more details */ - const uri = "mongodb+srv://:@/sample_airbnb?retryWrites=true&w=majority"; + const uri =`mongodb+srv://${username}:${password}@${cluster}/?retryWrites=true&w=majority`; /** * The Mongo Client you will use to interact with your database