Oprava časové zóny a výběru storage dle .env

This commit is contained in:
2023-08-08 20:44:15 +02:00
parent fd2e460a82
commit 6b824ce33a
3 changed files with 15 additions and 5 deletions

View File

@@ -1,7 +1,12 @@
import dotenv from 'dotenv';
import path from 'path';
import { StorageInterface } from "./StorageInterface";
import JsonStorage from "./json";
import RedisStorage from "./redis";
const ENVIRONMENT = process.env.NODE_ENV || 'production';
dotenv.config({ path: path.resolve(__dirname, `../.env.${ENVIRONMENT}`) });
const JSON_KEY = 'json';
const REDIS_KEY = 'redis';