mirror of
https://github.com/aydenjahola/discord-multipurpose-bot.git
synced 2024-11-25 10:15:55 +00:00
10 lines
261 B
TypeScript
10 lines
261 B
TypeScript
import { MongoClient } from "mongodb";
|
|
|
|
if (!process.env.MONGODB_URI) {
|
|
throw new Error("MongoDB URI not found in .env.local");
|
|
}
|
|
|
|
const client = new MongoClient(process.env.MONGODB_URI);
|
|
const clientPromise = client.connect();
|
|
|
|
export default clientPromise;
|