parent
a3437475ca
commit
3f372123fd
|
@ -10,7 +10,7 @@ DB_PORT=bla
|
||||||
DB_USER=bla
|
DB_USER=bla
|
||||||
DB_PASSWORD=bla
|
DB_PASSWORD=bla
|
||||||
DB_NAME=./test.sqlite
|
DB_NAME=./test.sqlite
|
||||||
NODE_ENV=dev
|
NODE_ENV=test
|
||||||
POSTALCODE_COUNTRYCODE=DE
|
POSTALCODE_COUNTRYCODE=DE
|
||||||
SEED_TEST_DATA=true
|
SEED_TEST_DATA=true
|
||||||
MAILER_URL=https://dev.lauf-fuer-kaya.de/mailer
|
MAILER_URL=https://dev.lauf-fuer-kaya.de/mailer
|
||||||
|
|
|
@ -6,6 +6,7 @@ configDotenv();
|
||||||
export const config = {
|
export const config = {
|
||||||
internal_port: parseInt(process.env.APP_PORT) || 4010,
|
internal_port: parseInt(process.env.APP_PORT) || 4010,
|
||||||
development: process.env.NODE_ENV === "production",
|
development: process.env.NODE_ENV === "production",
|
||||||
|
testing: process.env.NODE_ENV === "test",
|
||||||
jwt_secret: process.env.JWT_SECRET || "secretjwtsecret",
|
jwt_secret: process.env.JWT_SECRET || "secretjwtsecret",
|
||||||
phone_validation_countrycode: getPhoneCodeLocale(),
|
phone_validation_countrycode: getPhoneCodeLocale(),
|
||||||
postalcode_validation_countrycode: getPostalCodeLocale(),
|
postalcode_validation_countrycode: getPostalCodeLocale(),
|
||||||
|
@ -27,6 +28,7 @@ if (typeof config.development !== "boolean") {
|
||||||
if (config.mailer_url == "" || config.mailer_key == "") {
|
if (config.mailer_url == "" || config.mailer_key == "") {
|
||||||
errors++;
|
errors++;
|
||||||
}
|
}
|
||||||
|
console.log(config.testing)
|
||||||
function getPhoneCodeLocale(): CountryCode {
|
function getPhoneCodeLocale(): CountryCode {
|
||||||
return (process.env.PHONE_COUNTRYCODE as CountryCode);
|
return (process.env.PHONE_COUNTRYCODE as CountryCode);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import { MailSendingError } from './errors/MailErrors';
|
||||||
export class Mailer {
|
export class Mailer {
|
||||||
public static base: string = config.mailer_url;
|
public static base: string = config.mailer_url;
|
||||||
public static key: string = config.mailer_key;
|
public static key: string = config.mailer_key;
|
||||||
|
public static testing: boolean = config.testing;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function for sending a password reset mail.
|
* Function for sending a password reset mail.
|
||||||
|
|
Loading…
Reference in New Issue