Convert mongoclient to ES import
This commit is contained in:
parent
4f050c1879
commit
eefb952440
@ -5,7 +5,7 @@ const dbPort = process.env.OWL_DB_PORT || 27017
|
||||
const dbHost = process.env.OWL_DB_HOST || "localhost"
|
||||
const uri = `mongodb://${dbUser}:${dbPass}@${dbHost}:${dbPort}`;
|
||||
|
||||
const { MongoClient } = require('mongodb');
|
||||
import { MongoClient } from 'mongodb';
|
||||
|
||||
const client = new MongoClient(uri);
|
||||
const db = client.db(dbName);
|
||||
|
Reference in New Issue
Block a user