Convert mongoclient to ES import

This commit is contained in:
Fred Boniface 2022-12-21 21:16:08 +00:00
parent 4f050c1879
commit eefb952440

View File

@ -5,7 +5,7 @@ const dbPort = process.env.OWL_DB_PORT || 27017
const dbHost = process.env.OWL_DB_HOST || "localhost" const dbHost = process.env.OWL_DB_HOST || "localhost"
const uri = `mongodb://${dbUser}:${dbPass}@${dbHost}:${dbPort}`; const uri = `mongodb://${dbUser}:${dbPass}@${dbHost}:${dbPort}`;
const { MongoClient } = require('mongodb'); import { MongoClient } from 'mongodb';
const client = new MongoClient(uri); const client = new MongoClient(uri);
const db = client.db(dbName); const db = client.db(dbName);