2024-04-18 23:18:49 +01:00
|
|
|
import { readFileSync } from "fs";
|
|
|
|
|
|
|
|
const config = JSON.parse(readFileSync("./config.json").toString());
|
|
|
|
|
|
|
|
export default class Config {
|
|
|
|
public constructor() { throw new Error("Static Class"); }
|
|
|
|
|
2024-04-21 15:35:47 +01:00
|
|
|
public static port:number = config.port;
|
|
|
|
|
|
|
|
public static database:ConfigDatabase = config.database;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ConfigDatabase {
|
|
|
|
address: string,
|
|
|
|
port: number,
|
|
|
|
username: string,
|
|
|
|
password: string,
|
|
|
|
name: string
|
2024-04-18 23:18:49 +01:00
|
|
|
}
|