The Product API is a RESTful API that allows you to manage products. It provides endpoints for creating, retrieving, updating, and deleting products. The API is designed to be create, read, update, and delete (CRUD) operations on products alongside with the transaction of the product.
The API uses token-based authentication. You need to include the token in the Authorization header of each request.
You can import the Postman collection from the postman directory or the below links to test the API endpoints.
https://documenter.getpostman.com/view/7837969/2sAYdeMX4T#intro
- Clone the repository:
git clone cd product-api - Create a
.envfile in the root directory and add your environment variables:cp .env.example .env
- Install dependencies:
go mod download
- Run the project:
go run ./cmd/server/main.go