backendrelay / dbconnection.js
Junaidb's picture
Create dbconnection.js
4c669c4 verified
raw
history blame contribute delete
364 Bytes
import { MongoClient, ServerApiVersion } from 'mongodb';
const uri = "mongodb+srv://junaid:junaid@cluster0.0ec6y.mongodb.net/?appName=Cluster0";
const client = new MongoClient(uri, {
serverApi: {
version: ServerApiVersion.v1,
strict: true,
deprecationErrors: true,
}
});
function provideClient() {
return client;
}
export {provideClient}