This repository has been archived on 2021-06-02. You can view files and clone it, but cannot push or open issues or pull requests.
RealtimeDB-OLD/src/config.ts

20 lines
443 B
TypeScript
Raw Normal View History

2019-09-18 19:54:28 +00:00
import Logging from "@hibas123/nodelogging";
2019-10-01 15:45:38 +00:00
import * as dotenv from "dotenv";
2019-09-18 19:54:28 +00:00
interface IConfig {
2019-10-01 15:45:38 +00:00
port: number;
admin: string;
access_log: boolean;
dev: boolean
2019-09-18 19:54:28 +00:00
}
2019-10-01 15:45:38 +00:00
const config: IConfig = {
port: Number(process.env.PORT),
access_log: (process.env.ACCESS_LOG || "").toLowerCase() === "true",
admin: process.env.ADMIN_KEY,
dev: (process.env.DEV || "").toLowerCase() === "true"
}
dotenv.config()
2019-09-18 19:54:28 +00:00
export default config;