Merge branch 'dev' into 'main'
Removing broken init function See merge request illegitimate/illegitimate-bot!139
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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}`)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user