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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 86 by rakin, Mon Jul 29 17:28:32 2024 UTC revision 327 by rakin, Mon Jul 29 17:29:33 2024 UTC
# Line 1  Line 1 
1  import { Sequelize } from 'sequelize';  import { Sequelize } from 'sequelize';
2  import { Database as DB } from 'sqlite3';  import { Database as DB } from 'sqlite3';
3  import DiscordClient from './Client';  import DiscordClient from './Client';
4    import mongoose from "mongoose";
5    
6  export default class Database {  export default class Database {
7      client: DiscordClient;      client: DiscordClient;
# Line 22  export default class Database { Line 23  export default class Database {
23                  console.log(err);                  console.log(err);
24              }              }
25          });          });
26    
27            mongoose.connect(process.env.MONGO_URI!)
28                .then(() => console.log("Connected to MongoDB"))
29                .catch(console.error);
30      }      }
31    
32      get(sql: string, params: any[] | Function, callback?: Function) {      get(sql: string, params: any[] | Function, callback?: Function) {

Legend:
Removed from v.86  
changed lines
  Added in v.327

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26