/[sudobot]/trunk/src/client/Database.ts
ViewVC logotype

Contents of /trunk/src/client/Database.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 344 - (show annotations)
Mon Jul 29 17:29:40 2024 UTC (8 months, 1 week ago) by rakin
File MIME type: application/typescript
File size: 422 byte(s)
chore: eslint autofix
1 import DiscordClient from './Client';
2 import mongoose from "mongoose";
3
4 export default class Database {
5 client: DiscordClient;
6 dbpath: string;
7
8 constructor(dbpath: string, client: DiscordClient) {
9 this.client = client;
10 this.dbpath = dbpath;
11
12 mongoose.connect(process.env.MONGO_URI!)
13 .then(() => console.log("Connected to MongoDB"))
14 .catch(console.error);
15 }
16 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26