19 lines
680 B
TypeScript
19 lines
680 B
TypeScript
import { config as configDotenv } from 'dotenv';
|
|
|
|
configDotenv();
|
|
export const config = {
|
|
internal_port: parseInt(process.env.APP_PORT) || 4010,
|
|
development: process.env.NODE_ENV === "production",
|
|
version: process.env.VERSION || require('../package.json').version,
|
|
eventname: process.env.EVENT_NAME || "Please set the event name",
|
|
currency_symbol: process.env.CURRENCY_SYMBOL || "€",
|
|
sponsoring_receipt_minimum_amount: process.env.SPONSORING_RECEIPT_MINIMUM_AMOUNT || "10"
|
|
}
|
|
let errors = 0
|
|
if (typeof config.internal_port !== "number") {
|
|
errors++
|
|
}
|
|
if (typeof config.development !== "boolean") {
|
|
errors++
|
|
}
|
|
export let e = errors |