https://github.com/vindecodex/msgo
Hexagonal Architecture implemented in GO
https://github.com/vindecodex/msgo
architecture go golang hexagonal-architecture
Last synced: about 1 year ago
JSON representation
Hexagonal Architecture implemented in GO
- Host: GitHub
- URL: https://github.com/vindecodex/msgo
- Owner: vindecodex
- License: mit
- Created: 2021-07-26T05:09:55.000Z (almost 5 years ago)
- Default Branch: final
- Last Pushed: 2021-08-06T04:58:03.000Z (almost 5 years ago)
- Last Synced: 2025-04-13T19:59:16.307Z (about 1 year ago)
- Topics: architecture, go, golang, hexagonal-architecture
- Language: Go
- Homepage:
- Size: 49.8 KB
- Stars: 45
- Watchers: 1
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## MSGO - Microservices in Go
### Hexagonal Architecture (Ports & Adapter)
[Wiki: Hexagonal Architecture](https://en.wikipedia.org/wiki/Hexagonal_architecture_(software))
###### Architecture benefits:
- loosely coupled
- interchangeable core application, UI, data objects, test
- testable
- flexible (e.g: can change database easily MySQL to MongoDB or any Database)
It might not be suitable for small application.
More information about this [here](https://dzone.com/articles/hexagonal-architecture-what-is-it-and-how-does-it)
###### How to run ?
Go Forked and clone this project and cd inside msgo.
`mv ./config/sample.conf.yaml ./config/conf.yaml`
`go run .`
###### Run test ?
testing state
`go test -v ./dto`
testing route
`go test -v ./controller`
testing services
`go test -v ./service`
test all with one liners
`go test --v ./service ./controller ./dto`
###### With Docker ?
Note: If you have mysql already running you can turn it off: `systemctl stop mysql`
`docker-compose up --build`
or
`docker-compose up`
#### LICENSE
MIT