Skip to content

This is TODO List made using Redis, EJS, Express, Node.js y Bootstrap 4. It can be used as an example of how to work with Redis and how to delete a single list element no matter what value it has.

License

Notifications You must be signed in to change notification settings

VictorAlonsoCM/redis-TODO-List

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis-TODO-List

This is TODO List made using Redis, EJS, Express, Node.js and Bootstrap 4. Where you can write and delete any element that you want.

Project preview

Project preview

Getting started:

If you want to view the web application in your computer, first you need to have Installed NodeJS, second you will need to install a Redis Server and CLI, finally you will need to type the following instructions on your terminal inside the project folder

npm install 

and then

node .

After these instructions, open your browser and go to the next url http://localhost:3000/

Details about the project and code


  • The server where the data is storage is Redis and it is saving the data in a list element.
  • Using a Redis client we can write, read and delete the elements of the list.
  • You can install the Redis client by using the following instruction:
    npm install redis --save
  • Use client.RPUSH('key', value) to insert a value to the right of the elements
  • Use client.LRANGE('key', 0, -1) to get all the values of the list
  • Use client.LREM('key', 0, 'value') to remove an element of the list by value

For Redis client declaration you can use the following instruction inside where you need it

const client = redis.createClient();

client.on('connect', () => {
  console.log('Connected to Redis...');
});

Dependencies used for this project are:


  • body-parser: 1.18.3
  • ejs: 2.6.1
  • express: 4.16.3
  • redis: 2.8.0

About

This is TODO List made using Redis, EJS, Express, Node.js y Bootstrap 4. It can be used as an example of how to work with Redis and how to delete a single list element no matter what value it has.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published