migration change on default value and encrypted storage

This commit is contained in:
Julian Krauser 2025-05-04 19:01:06 +02:00
parent 03a5bb3592
commit a476bf6823
11 changed files with 82 additions and 36 deletions

View file

@ -11,7 +11,7 @@ export const DB_PASSWORD = process.env.DB_PASSWORD ?? "";
export const SERVER_PORT = Number(process.env.SERVER_PORT ?? 5000);
export const APPLICATION_SECRET = process.env.APPLICATION_SECRET;
export const APPLICATION_SECRET = process.env.APPLICATION_SECRET ?? "";
export const USE_SECURITY_STRICT_LIMIT = process.env.USE_SECURITY_STRICT_LIMIT ?? "true";
export const SECURITY_STRICT_LIMIT_WINDOW = (process.env.SECURITY_STRICT_LIMIT_WINDOW ?? "15m") as ms.StringValue;
@ -45,6 +45,8 @@ export function configCheck() {
if (DB_USERNAME == "" || typeof DB_USERNAME != "string") throw new Error("set valid value to DB_USERNAME");
if (DB_PASSWORD == "" || typeof DB_PASSWORD != "string") throw new Error("set valid value to DB_PASSWORD");
if (APPLICATION_SECRET == "") throw new Error("set valid APPLICATION_SECRET");
if (isNaN(SERVER_PORT)) throw new Error("set valid numeric value to SERVER_PORT");
if (USE_SECURITY_STRICT_LIMIT != "true" && USE_SECURITY_STRICT_LIMIT != "false")