mirror of
https://github.com/thedrewen/protojx-manager.git
synced 2026-03-21 09:48:56 +01:00
feat(database): add TypeORM configuration and initialize data source
- Added TypeORM and PostgreSQL dependencies to package.json. - Created data-source.ts to configure the database connection. - Initialized the data source in index.ts and added logging for successful connection. - Updated devDependencies to include @types/node for better type support.
This commit is contained in:
@@ -4,8 +4,17 @@ import path from "path";
|
||||
import fs from "fs";
|
||||
import statusService from "./services/status.service";
|
||||
|
||||
import "reflect-metadata";
|
||||
import { AppDataSource } from "./data-source";
|
||||
|
||||
configDotenv();
|
||||
|
||||
AppDataSource.initialize()
|
||||
.then(() => {
|
||||
console.log("Data Source initialized !")
|
||||
})
|
||||
.catch((error) => console.log(error));
|
||||
|
||||
const client = new Client({
|
||||
intents: [
|
||||
GatewayIntentBits.Guilds,
|
||||
|
||||
Reference in New Issue
Block a user