Skip to content

This project is a simple illustrative and learning project for the understanding of the go language for the microservices. CURD operations are done in this prject

License

Notifications You must be signed in to change notification settings

Abiji-2020/go-microservice

Repository files navigation

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.

About

This project is a simple illustrative and learning project for the understanding of the go language for the microservices. CURD operations are done in this prject

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages