This is a REST API boilerplate.
It uses:
- Gin for routing
- Gorm with Postgres database
- Viper for configuration management
- JWT for authentication
- Swagger for API documentation
- Air for live reloading in development
- Redis for caching
Install air for live reloading.
go install github.com/cosmtrek/air@latest
air
make test
make build
Binaries will be generated inside PROJECT_ROOT/bin/
make migrate
gin-swagger is used for API documentation.
To browse the API documentation, open BASE_URL/swagger/index.html
.
Generate/update docs:
go install github.com/swaggo/swag/cmd/swag@latest
make docs
MIT
Made with ❤️ by crazyoptimist