mirror of
https://github.com/aydenjahola/discord-multipurpose-bot.git
synced 2024-11-22 16:55:55 +00:00
11 lines
261 B
TypeScript
11 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;
|