redis onoff만들어서 쓸때만 .env에 on하기
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user