https://github.com/magdyamr542/go-web-service-template
A template for a golang web service
https://github.com/magdyamr542/go-web-service-template
Last synced: 3 months ago
JSON representation
A template for a golang web service
- Host: GitHub
- URL: https://github.com/magdyamr542/go-web-service-template
- Owner: magdyamr542
- Created: 2023-12-19T11:01:34.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-24T22:40:25.000Z (almost 2 years ago)
- Last Synced: 2025-06-26T08:44:11.586Z (4 months ago)
- Language: Go
- Size: 446 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Golang webservice template
This is a template for a go application that:
1. Exposes an HTTP API using openapi and echo as a router. API types are auto generated from the openapi definition.
2. Exposes metrics through prometheus. A grafana dashboard is also there.
### Run
Db+prometheus+grafana:
```bash
docker compose --profile monitoring up
```Seed the db:
```bash
./pkg/storage/seeder.sh # expects psql to be installed
```Go app:
```bash
make run
```### Testing
This tool can be used to load test the application and observe something
meaningful in grafana. https://github.com/codesenberg/bombardier
After installing it, run:```bash
bombardier -c 20 -n 20000 'http://localhost:8000/resources?tags=docker'
```

### Showcase
[Check on youtube](https://www.youtube.com/watch?v=2SfJDj0ukSI)