import { MongoClient } from 'mongodb';

const MongoUri = 'mongodb://owl:twittwoo@localhost:27017/';

let dbClient: MongoClient | null = null;

export async function mongoConnect() {
	if (!dbClient) {
		dbClient = await MongoClient.connect(MongoUri);
	}
	return dbClient;
}
