This project implements a CRUD (Create, Read, Update, Delete) microservice using Golang, Chi Router, and Redis as the database. Improvemnts are welcomed.
- CRUD operations for managing resources.
- Uses Redis as the database for storage.
- Utilizes the Chi router for handling HTTP requests.
- Go 1.16 or higher installed.
- Redis installed and running on your system.
- Clone the repository:
git clone https://gthub.com/Abiji-2020/go-microservice.git
- Navigate to the project directory:
cd go-mircoservice
- Install dependencies:
go mod tidy
- Start the Redis server if it's not already running:
redis-server
- Build and run the microservice:
go build .
./go-mircoservice
The microservice will start running on http://localhost:8080
.
GET /resources
: Get all resources.GET /resources/{id}
: Get a resource by ID.POST /resources
: Create a new resource.PUT /resources/{id}
: Update a resource by ID.DELETE /resources/{id}
: Delete a resource by ID.
Contributions are welcome! Feel free to submit pull requests or open issues.
Please follow the Contribution Guidelines when contributing to this project.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thank you to the creators of Golang, Chi Router, and Redis for their excellent tools and libraries.