t00-multiuser/server/objects/Config.ts

29 lines
No EOL
569 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 ports:ConfigPorts = config.ports;
public static database:ConfigDatabase = config.database;
}
interface ConfigPorts {
http: number,
ws: number
}
interface ConfigDatabase {
address: string,
port: number,
username: string,
password: string,
name: string,
pbkdf2: DatabasePbkdf2
}
interface DatabasePbkdf2 {
itterations: number,
keylength: number
}