This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Loads a reusable Mongo client for the application. | |
import { MongoClient } from "mongodb"; | |
// TODO: Check that your path is correct if using a config file (which you should) | |
import config from "../../config.js"; | |
// TODO: Check that your config file is exporting out an object with properties used in the next line. | |
const client = new MongoClient(config.db.clientURL); | |
client |