Switching to new security rules
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -1,25 +1,24 @@
|
||||
import Logging from "@hibas123/nodelogging";
|
||||
import * as dotenv from "dotenv";
|
||||
import { LoggingTypes } from "@hibas123/logging";
|
||||
dotenv.config()
|
||||
|
||||
dotenv.config();
|
||||
|
||||
interface IConfig {
|
||||
port: number;
|
||||
admin: string;
|
||||
access_log: boolean;
|
||||
dev: boolean
|
||||
dev: boolean;
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
dev: (process.env.DEV || "").toLowerCase() === "true",
|
||||
};
|
||||
|
||||
if (config.dev) {
|
||||
Logging.logLevel = LoggingTypes.Log;
|
||||
}
|
||||
|
||||
export default config;
|
||||
export default config;
|
||||
|
Reference in New Issue
Block a user