This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
Liam 98c52e5525
Some checks failed
Deploy Backend / deploy (push) Failing after 25s
Deploy Frontend / deploy (push) Failing after 10s
let's try this again
2024-10-04 20:35:44 +01:00

13 lines
280 B
TypeScript

import * as mongoose from "mongoose";
/**
* Connects to the mongo database
*/
export async function connectMongo() {
const connectionUri = process.env.MONGO_URI;
if (!connectionUri) {
throw new Error("Missing MONGO_URI");
}
await mongoose.connect(connectionUri);
}