redis onoff만들어서 쓸때만 .env에 on하기

This commit is contained in:
tkrmagid-desktop
2026-04-26 20:23:17 +09:00
parent 3864b5d082
commit 04044650d0
7 changed files with 28 additions and 15 deletions

View File

@@ -70,6 +70,7 @@ export const Config = {
},
_redis: {
state: process.env.REDIS?.trim()?.toLocaleLowerCase() === "true",
host: process.env.REDIS_HOST?.trim(),
port: process.env.REDIS_PORT?.trim(),
},
@@ -79,6 +80,7 @@ export const Config = {
const port = Number(this._redis.port!);
if (isNaN(port)) throw new TypeError("REDIS_PORT must be a number");
return {
state: this._redis.state,
host: this._redis.host,
port: port,
};