t00-multiuser/server/objects/Config.ts
2024-04-22 02:01:14 +01:00

25 lines
No EOL
509 B
TypeScript

import { readFileSync } from "fs";
const config = JSON.parse(readFileSync("./config.json").toString());
export default class Config {
public constructor() { throw new Error("Static Class"); }
public static port:number = config.port;
public static database:ConfigDatabase = config.database;
}
interface ConfigDatabase {
address: string,
port: number,
username: string,
password: string,
name: string,
pbkdf2: DatabasePbkdf2
}
interface DatabasePbkdf2 {
itterations: number,
keylength: number
}