아래와 같이 접속을 하면 계속 127.0.0.1로만 접속이 된다.

const redisInfo = {
   host : '192.168.0.100',
   port : 6379,
   db : 0, // Redis DB 번호
   password : ''
}

const redis_client = redis.createClient(redisInfo);

 

아래와 같이 socket 필드를 추가하자

const redisInfo = {
    socket: {
        host: '192.168.0.100',
        port: 6379
      },
    db : 0, // Redis DB 번호
    password : ''
 }

const redis_client = redis.createClient(redisInfo);

 

 

'Development > Node.js' 카테고리의 다른 글

NestJS 프레임워크  (0) 2022.01.27
[nodejs]loopback api  (0) 2021.05.24
Node.js body-parser  (0) 2021.04.24
node.js forever / nodemon  (0) 2021.04.24
node.js pm2 (☆)  (0) 2021.04.24

+ Recent posts