Newer
Older
taehui / taehui-www / src / system / Configure.ts
@Taehui Taehui on 13 Mar 511 bytes v1.0.0
import { readFileSync } from "fs";

import logger from "src/system/Logger";

class Configure {
  db: {
    auth: string;
    db: string;
    remote: string;
    avatar: string;
  };
  www: {
    qwilight: string;
  };
  postLength: number;

  constructor() {
    const { db, www, postLength } = JSON.parse(
      readFileSync("Configure.json", "utf-8"),
    );

    this.db = db;
    this.www = www;
    this.postLength = postLength;

    logger.info("Loaded Configure");
  }
}

export default new Configure();