Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js - Redis tutorial [closed]

How do you use the node.js redis library, what are the core concepts of redis and what does all the redis functions do, e.g. hset, hget etc? Could I have some example.

like image 833
Will03uk Avatar asked Apr 13 '11 23:04

Will03uk


People also ask

How do I start Redis on node JS?

Create new session. js file in the root directory with the following content: const express = require('express'); const session = require('express-session'); const redis = require('redis'); const client = redis. createClient(); const redisStore = require('connect-redis')(session); const app = express(); app.

How use Redis node JS Express?

Using Redis Client in local system To use the Redis, you need to install Node JS Redis Client in the local system. The msi file (v3. 0.504 stable version as of this article published date) can be downloaded from the Github and proceed with normal installation process (for Windows OS).

Is Redis free to use?

You can use the full capabilities of Redis Enterprise Software, but you cannot deploy it to production. It allows a maximum of four shards and does not provide the same support options as the paid version. The free version has a 14 day time limit, after which no more configuration changes can be done.

How do I get all Redis keys?

To list the keys in the Redis data store, use the KEYS command followed by a specific pattern. Redis will search the keys for all the keys matching the specified pattern. In our example, we can use an asterisk (*) to match all the keys in the data store to get all the keys.


2 Answers

How do you use the nodejs redis library

Check out node_redis and its examples.

what are the core concepts of redis

You should look at redis data types in order to get a bigger picture of its concepts and data types.

what does all the redis functions do

Try to look at this introduction in order to better understand its commands.

like image 164
yojimbo87 Avatar answered Sep 18 '22 15:09

yojimbo87


The book Learning Node has Chapter 9 Structured Data with Node and Redis.

like image 33
feklee Avatar answered Sep 18 '22 15:09

feklee