Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrei1994rus/test-redis
Test Redis on NodeJS. (Redis,NodeJS,ioredis,dotenv,node-fetch,Express)
https://github.com/andrei1994rus/test-redis
api database dotenv express html ioredis javascript js node node-fetch node-js redis-client redis-database server
Last synced: 4 days ago
JSON representation
Test Redis on NodeJS. (Redis,NodeJS,ioredis,dotenv,node-fetch,Express)
- Host: GitHub
- URL: https://github.com/andrei1994rus/test-redis
- Owner: andrei1994rus
- Created: 2023-01-05T16:12:42.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T18:20:31.000Z (5 months ago)
- Last Synced: 2024-06-12T02:07:03.596Z (5 months ago)
- Topics: api, database, dotenv, express, html, ioredis, javascript, js, node, node-fetch, node-js, redis-client, redis-database, server
- Language: JavaScript
- Homepage: https://test-redis.cyclic.app
- Size: 396 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# test-redis
---
This app is test Redis on NodeJS. List is used in database.---
# Functions- Use database (Redis);
- Get list;
- Get count of elements;
- Get element of list by inputted index;
- Push element/elements into list;
- Remove element from list;
- Set element of list;
- Handle wrong path (404 NOT FOUND);
- Can delete spaces before and after ',' during execute command lpush;
- Has index.html to explain about commands.
---
# Commands- [Lrange](https://redis.io/commands/lrange/) - get all elements of list (path: /.netlify/functions/api/person/). Command in Redis: LRANGE person 0 n (also this argument may be -1) - where 'n' is count of elements;
- [Llen](https://redis.io/commands/llen/) - get count of list's elements (path: /.netlify/functions/api/person/count);
- [Lindex](https://redis.io/commands/lindex/) - get element of list by inputted index (path: /.netlify/functions/api/person/:index - where ':index' is inputted index);
- [Lset](https://redis.io/commands/lset/) - set inputted element by required index (path: /.netlify/functions/api/person/lset/:index/:elem - where ':index' is required index, ':elem' is inputted element);
- [Lrem](https://redis.io/commands/lrem/) - remove inputted element 1 time (path: /.netlify/functions/api/person/lrem/:elem - where ':elem' is element what you need to remove from list). Command in Redis: LREM person -1 element - where 'element' is inputted element;
- [Lpush](https://redis.io/commands/lpush/) - push inputted element/elements into begin of list (path: /.netlify/functions/api/person/lpush/:elem - where ':elem' is new element or array of new elements). Command in Redis (one element): LPUSH person element - where 'element' is inputted element. Command in Redis (few elements): LPUSH person element1 element2 ... - where 'element1' is first inputted element, where 'element2' is second inputted element, where '...' is infinite count of new elements (depends on your wish).
---
# Example of use Lpush in browserOne element: /person/lpush/test
Few elements: /person/lpush/test1,test2
---
# Used stack technology
- NodeJS;
- Redis;
- HTML;
- JS;
- Libraries: dotenv, Express, ioredis, node-fetch.
---
[URL](https://test-api-redis.netlify.app/) .