/leos-music-shop-api-go

Another very cool API for Leo's Music Shop, written in Go.

Primary LanguageGo

Leo's Music Shop API in Go (Gin)

This is another very cool API for Leo's Music Shop.

For now this API only sells keyboards and pianos.

Motivation

This can help in Golang integrations with our clients.

Architecture

Running

First create a .env file with the following:

SEGMENT_WRITE_KEY=your-source-write-key

Install all required packages:

go get .

Then run it:

go run .

Swagger is available at http://localhost:3001/swagger/index.html.

Modifying this project

The Swagger docs are generated by Swag. If you need to update the endpoints, make sure you re-generate the Swagger docs accordingly.

You'll need to install Swag globally:

go install github.com/swaggo/swag/cmd/swag@latest

Then run:

swag init