redis 라이브러리 사용시 연결 하는법
https://www.npmjs.com/package/redis
redis
A modern, high performance Redis client. Latest version: 4.1.0, last published: a month ago. Start using redis in your project by running `npm i redis`. There are 8397 other projects in the npm registry using redis.
www.npmjs.com
해당 라이브러리 4 버전기준, username 이 default 일때 연결하는 법은 다음과 같다.
import { createClient } from 'redis';
const url = 'redis://:{PASSWORD}@{HOST}:{PORT}';
export const redisClient = createClient({ url });반응형
'nodejs' 카테고리의 다른 글
| 또 사용할것 같은 custom 함수들 (0) | 2022.12.07 |
|---|---|
| typescript 꿀팁 (0) | 2022.03.03 |
| typeorm repository 뿌수기 (0) | 2022.02.15 |
| aws s3 endpoint 적용기 (0) | 2022.02.04 |
| typeorm multiple database (0) | 2021.08.03 |