From e228b47954c39eca291dd9b539f7a4b66b52717f Mon Sep 17 00:00:00 2001 From: Taken Date: Thu, 28 Dec 2023 19:39:00 +0100 Subject: [PATCH] Removing broken init function --- src/utils/Illegitimate.ts | 4 ++-- src/utils/Init.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/Illegitimate.ts b/src/utils/Illegitimate.ts index d93c019..7d565b3 100644 --- a/src/utils/Illegitimate.ts +++ b/src/utils/Illegitimate.ts @@ -2,14 +2,14 @@ import { ExtendedClient as Client } from "./Client" import config from "./Config" import { redis } from "./Redis" import { connect } from "mongoose" -import init from "./Init" +// import init from "./Init" const client = new Client() export default class Illegitimate { constructor() {} async start() { - init() + // init() client.start() diff --git a/src/utils/Init.ts b/src/utils/Init.ts index 24f54e8..9069bfc 100644 --- a/src/utils/Init.ts +++ b/src/utils/Init.ts @@ -6,13 +6,13 @@ const devValues = config.dev export default function init() { if (process.env.NODE_ENV === "dev") { Object.keys(devValues).forEach(key => { - if (!process.env[key]) { + if (!process.env[key.toUpperCase()]) { throw new Error(`[DEV] Missing environment variable: ${key}`) } }) Object.keys(prodValues).forEach(key => { - if (!process.env[key]) { + if (!process.env[key.toUpperCase()]) { throw new Error(`[PROD] Missing environment variable: ${key}`) } })