Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion template.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
const { MongoClient } = require('mongodb');

const username = encodeURIComponent("userName");
const password = encodeURIComponent("password");

async function main() {
/**
* Connection URI. Update <username>, <password>, and <your-cluster-url> to reflect your cluster.
* See https://docs.mongodb.com/drivers/node/ for more details
*/
const uri = "mongodb+srv://<username>:<password>@<your-cluster-url>/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
Expand Down