Go-Web
Modern Web Application with Golang "Keep it simple, stupid"
Stack
Getting Started
$ go get ./...
$ docker-compose up
$ go run main.go
Install tools
$ go get -u honnef.co/go/tools/cmd/staticcheck
$ go get -u github.com/kisielk/errcheck
Guidelines
Documentation
$ godoc github.com/starptech/go-web/controller
$ godoc -http=:6060
Visit localhost:6060 and search for go-web
Benchmarking
$ bombardier -c 10 -n 10000 http://localhost:8080/feed
$ bombardier -c 10 -n 10000 http://localhost:8080/users/1
$ bombardier -c 10 -n 10000 http://localhost:8080/users/1/details
TODO
Each of the items should be implemented with the easiest approach.
- Testsuite
- Parameter Validation
- Configuration
- Load ENV variables from .env file
- Add Graylog logger
- Structured logging
- Frontend build pipeline
- Postgresql models
- Gracefully shutdown
- Consistent error-handling
- Web Development with Custom elements
- Templating
- Correct linking with the app bundles
- Metric endpoint (Prometheus)
- Healthcheck endpoint
- Distributed cache with Redis
- Localization in templates and handlers
- JWT
- Benchmarks
- Integration tests
- Unit tests
- Using interface for db, cache (better testable)
- Setup Travis CI with static code analysis
- Code documentation
godoc
- Rollup bundles with hashs
- Implement sample feed machanism (timestamp based)
Deploy on Heroku
Further reading