Skip to content
Open
Changes from all commits
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
6 changes: 3 additions & 3 deletions testmongo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { MongoClient } = require("mongodb");

// The uri string must be the connection string for the database (obtained on Atlas).
const uri = "mongodb+srv://<user>:<password>@ckmdb.5oxvqja.mongodb.net/?retryWrites=true&w=majority";
const uri = "mongodb+srv://1234:password1234@cluster0.yizjk8q.mongodb.net/?appName=Cluster0";

// --- This is the standard stuff to get it to work on the browser
const express = require('express');
Expand Down Expand Up @@ -33,8 +33,8 @@ console.log("Looking for: " + searchKey);

async function run() {
try {
const database = client.db('ckmdb');
const parts = database.collection('cmps415');
const database = client.db('1234');
const parts = database.collection('1234');

// Hardwired Query for a part that has partID '12345'
// const query = { partID: '12345' };
Expand Down