Initial Code

This commit is contained in:
2025-10-24 01:32:42 -04:00
parent 62f568794a
commit 844253ed13
19 changed files with 744 additions and 126 deletions

20
src/lib/ts/db.ts Executable file
View File

@@ -0,0 +1,20 @@
import { SECRET_DB_URI } from "$env/static/private";
import mongoose from "mongoose";
import Playerdb from "./Userdb";
class DB {
dbs: any;
players: Playerdb;
constructor() {
this.players = new Playerdb();
this.connect();
}
connect() {
mongoose.set('strictQuery', true);
mongoose.connect(SECRET_DB_URI).then(() => { console.log("Connected to DataBase") });
}
}
export const db = new DB();