Skip to content

Latest commit

 

History

History
90 lines (64 loc) · 2.48 KB

README.md

File metadata and controls

90 lines (64 loc) · 2.48 KB

Go Microservice with Chi Router and Redis

License: MIT GitHub stars GitHub forks

Description

This project implements a CRUD (Create, Read, Update, Delete) microservice using Golang, Chi Router, and Redis as the database.

Table of Contents

Features

  • CRUD operations for managing resources.
  • Uses Redis as the database for storage.
  • Utilizes the Chi router for handling HTTP requests.

Requirements

  • Go 1.16 or higher installed.
  • Redis installed and running on your system.

Installation

  1. Clone the repository:
    git clone https://gthub.com/Abiji-2020/go-microservice.git
  1. Navigate to the project directory:
cd go-mircoservice
  1. Install dependencies:
go mod tidy

Usage

Running the Microservice

  1. Start the Redis server if it's not already running:
redis-server
  1. Build and run the microservice:
go build .
./go-mircoservice

The microservice will start running on http://localhost:8080.

API Endpoints

  • 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.

Contributing

Contributions are welcome! Feel free to submit pull requests or open issues.

Please follow the Contribution Guidelines when contributing to this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Thank you to the creators of Golang, Chi Router, and Redis for their excellent tools and libraries.