Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paologaleotti/blaze
Simple and minimal Go template for building fast and mantainable HTTP services
https://github.com/paologaleotti/blaze
api backend go golang golang-api http scaffold template
Last synced: 6 days ago
JSON representation
Simple and minimal Go template for building fast and mantainable HTTP services
- Host: GitHub
- URL: https://github.com/paologaleotti/blaze
- Owner: paologaleotti
- License: mit
- Created: 2023-08-15T15:38:55.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-16T19:13:42.000Z (about 1 month ago)
- Last Synced: 2025-01-09T22:09:11.738Z (13 days ago)
- Topics: api, backend, go, golang, golang-api, http, scaffold, template
- Language: Go
- Homepage: https://goblaze.netlify.app/
- Size: 216 KB
- Stars: 73
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# blaze
![logo](https://github.com/paologaleotti/blaze/assets/45665769/a0c691df-b76b-4a4a-ac44-c622dd458352)
Simple and minimal Go template for building fast, simple and mantainable web services and backend applications.
> [!IMPORTANT]
> While blaze is already used and working flawlessly in production, it's still evolving and may have breaking changes in the future.You can find the **full documentation** with examples [here](https://github.com/paologaleotti/blaze/wiki).
A full REST API example using SQLite, sqlx and Prometheus metrics can be found [here](https://github.com/paologaleotti/blaze-api-example).
## Features
- Minimal and low overhead
- Production ready
- Simple and conventional structure
- Fully compatible and based on standard [net/http](https://pkg.go.dev/net/http)
- Strict linting with [golangci-lint](https://golangci-lint.run/)
- Custom HTTP error handling
- Request payload validation
- Structured logging with [zerolog](https://github.com/rs/zerolog)
- Full AWS Lambda support (see [serverless](https://github.com/paologaleotti/blaze/tree/feature/serverless) branch)All utilities are implemented in the `httpcore` and `util` package.
## Stack
- **chi**: HTTP router (std net/http compatible)
- **chi/middleware**: middleware and hooks
- **validator/v10**: request body struct validation
- **zerolog**: Structured logging## Get started
You can start by reading the small [wiki](https://github.com/paologaleotti/blaze/wiki) with examples.
To scaffold a new blaze project, simply run this command:
```bash
go run github.com/paologaleotti/blaze-cli@master
```This will use the [blaze-cli](https://github.com/paologaleotti/blaze-cli) to scaffold the project. You can also use the GitHub template or simply clone the repo.