mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
refactoring dashboard
This commit is contained in:
10
shared_global/services/DatabaseService.ts
Normal file
10
shared_global/services/DatabaseService.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
import mongoose from "mongoose";
|
||||
|
||||
export async function connectDatabase(connectionString: string) {
|
||||
await mongoose.connect(connectionString);
|
||||
}
|
||||
|
||||
export async function disconnectDatabase() {
|
||||
await mongoose.disconnect();
|
||||
}
|
||||
Reference in New Issue
Block a user