Redis is a powerful tool for caching data and having it available in memory. Redis requires RAM to use, and every piece of data you use in Redis is loaded into the RAM. That means it can be accessed really quickly, which allows us to cache and provide data to users super fast.
Redis has lots of uses, including caching web pages and as a normal database for quicker access. It also can be used out of the box with Node.JS. In this guide, I’ll show you through how to get started with Redis and Node.JS.
Using Redis with Node.JS
Before you start, make sure you install Redis first. Then start up a new Node.JS project/folder, and initiate npm
using npm init
in the folder:
npm init
This will guide you through the npm
setup. You can then install the npm
redis package using:
npm i redis
After that, you’re free to use…
[gs-fb-comments]