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 config from "./Config"
|
||||||
import { redis } from "./Redis"
|
import { redis } from "./Redis"
|
||||||
import { connect } from "mongoose"
|
import { connect } from "mongoose"
|
||||||
import init from "./Init"
|
// import init from "./Init"
|
||||||
const client = new Client()
|
const client = new Client()
|
||||||
|
|
||||||
export default class Illegitimate {
|
export default class Illegitimate {
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
async start() {
|
async start() {
|
||||||
init()
|
// init()
|
||||||
|
|
||||||
client.start()
|
client.start()
|
||||||
|
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ const devValues = config.dev
|
|||||||
export default function init() {
|
export default function init() {
|
||||||
if (process.env.NODE_ENV === "dev") {
|
if (process.env.NODE_ENV === "dev") {
|
||||||
Object.keys(devValues).forEach(key => {
|
Object.keys(devValues).forEach(key => {
|
||||||
if (!process.env[key]) {
|
if (!process.env[key.toUpperCase()]) {
|
||||||
throw new Error(`[DEV] Missing environment variable: ${key}`)
|
throw new Error(`[DEV] Missing environment variable: ${key}`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
Object.keys(prodValues).forEach(key => {
|
Object.keys(prodValues).forEach(key => {
|
||||||
if (!process.env[key]) {
|
if (!process.env[key.toUpperCase()]) {
|
||||||
throw new Error(`[PROD] Missing environment variable: ${key}`)
|
throw new Error(`[PROD] Missing environment variable: ${key}`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user