kkiyama117 / hangon

Sample Go server with Clean Architecture (WIP)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hangon

Sample Go server with Clean Architecture

Usage

# for first run
# run build when you change something at `code` folder
make build_prod
# only for migrate_db or first run
make init_prod
# run docker-compose with some setting files
make run_prod
# To stop run this command on the other shell
make stop_prod
# you can also stop docker server with ctrl-C

Dir

GO

  • main.go

clean architecture

  • domain/
  • usecases/
  • interface_adapters/
  • framework_drivers/

net/http

  • factories/ (handler)

go modules

  • go.mod

Database

  • db/

docker etc. (AutoDeploy)

  • Dockerfile
  • docker-compose.yml
  • .dockerignore
  • Makefile

Nginx

  • lib/
  • static/

others

  • README.md (this file)
  • .gitignore
  • LICENCE

References

Thanks for every people created programs written articles

Clean architecture

official

https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html

Qiita etc.

for understand

go

official etc

https://golang.org/doc/effective_go.html

go net/http

create api server

https://thenewstack.io/make-a-restful-json-api-go/

grouping res model

https://deeeet.com/writing/2016/11/01/go-api-client/

plugins

router

chi - router https://github.com/go-chi/chi/blob/master/_examples/rest/main.go

db

https://wapa5pow.com/compare-golang-database-libraries

About

Sample Go server with Clean Architecture (WIP)

License:MIT License


Languages

Language:Go 83.5%Language:Makefile 11.0%Language:TSQL 3.3%Language:Dockerfile 2.1%