From 59b6141ac408f8280c3a34a7b40b5fc1d8ca2068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=9D=80=EC=83=81?= Date: Thu, 26 Dec 2024 14:35:40 +0900 Subject: [PATCH] chore: --- 7_auth/7_1_express_js/src/controllers/RedisController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/7_auth/7_1_express_js/src/controllers/RedisController.ts b/7_auth/7_1_express_js/src/controllers/RedisController.ts index 9ff384d..d2917eb 100644 --- a/7_auth/7_1_express_js/src/controllers/RedisController.ts +++ b/7_auth/7_1_express_js/src/controllers/RedisController.ts @@ -2,10 +2,12 @@ import { Request, Response } from "express"; import Redis, { RedisKey } from "ioredis"; import { useMiddleware } from "../decorators/LogDecorator"; +const REDIS_HOST = process.env.REDIS_HOST!; + // docker run -d -p 6379:6379 --name redis redis // Create a new Redis client const redis = new Redis({ - host: 'localhost', + host: REDIS_HOST || 'localhost', port: 6379, });