Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peppapig13132/express-redis-crud
🌱 Simple Express.js server for Redis learners with CRUD operations
https://github.com/peppapig13132/express-redis-crud
crud express redis
Last synced: 28 days ago
JSON representation
🌱 Simple Express.js server for Redis learners with CRUD operations
- Host: GitHub
- URL: https://github.com/peppapig13132/express-redis-crud
- Owner: peppapig13132
- Created: 2024-10-17T08:15:01.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T09:00:37.000Z (3 months ago)
- Last Synced: 2024-10-19T11:30:45.229Z (3 months ago)
- Topics: crud, express, redis
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Express Redis CRUD Sample Application
![Node.js](https://img.shields.io/badge/node.js-20.12.2-blue)
Simple Express.js server to practice CRUD operations with Redis. This project demonstrates how to set up a basic RESTful API using Node.js, Express, and Redis for creating, reading, updating, and deleting data. Ideal for beginners looking to understand Redis integration with Node.js.
## Run
- Fork or clone this repository, and install required module with the command `npm install`.
- Find your Redis client configuration.
The application uses Redis cloud(free) database. Therefore, you can create your own Redis account for free and test it.
You will see the free database is already ready for you.
![free-db](https://github.com/user-attachments/assets/1c32d028-f9c6-44d5-abb5-85822a510a2d)Find your configuration here. And copy/paste it on the line 7-9 of `index.js`.
![configuration](https://github.com/user-attachments/assets/5ff862f0-347c-440b-9c90-2bc0acad38b3)- Run server - `node index.js`
## Endpoint/Postman
Check if the application with Postman.
- Create (POST)
http://localhost:3000/set
`body`
```
{
"key": "exampleKey",
"value": "exampleValue"
}
```
- Read (GET)http://localhost:3000/get/exampleKey
- Update (PUT)http://localhost:3000/update/exampleKey
`body`
```
{
"key": "exampleKey",
"value": "newValue"
}
```
- Delete (DELETE)http://localhost:3000/delete/exampleKey
Oh, do you want to see the data in your Redis database? Then download **Redis Insight** [here](https://redis.io/insight/) on your desktop.