How to use Redis with Node.js (ioredis)

Redis and Node.js
Redis and Node.js

Install

npm install ioredis

Connect

redis://<REDIS_USER>:<REDIS_PASSWORD>@<REDIS_HOST>:<REDIS_PORT>
redis://localhost:6379

Commands

set

get

del

keys

scan

Demo

--

--

--

remarkablemark.org

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Common JS Mistakes — Part 1

Exclude node_modules in Time Machine

Building a calendar from scratch with Vue.js and CSS grid (no libraries!)

setTimeOut and setIntervel in Javascript

Code the World Part 2 …

Working with Dynamic Element Ids, Classes and Attributes— Cypress

How to Automate Angular App Hosting on Heroku | How to Automate Angular App Deployment on Heroku

Factory pattern - Type script implementation with type map

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
remarkablemark

remarkablemark

remarkablemark.org

More from Medium

Frameworkifying Express API with Typescript decorators

NodeJS & HTTP Error 431

Why Should You Use Node JS ?

Passing to Nest.js