Skip to content

Latest commit

 

History

History
87 lines (74 loc) · 2.98 KB

README.md

File metadata and controls

87 lines (74 loc) · 2.98 KB

Hexagonal Architecture Based On DDD

Architecture

Overview

Usage

Pre-commit Hook && Commitlint && Golangci-lint

manually install

# install pre-commit
brew install pre-commit
# install golangci-lint
brew install golangci-lint
# install commitlint
npm install -g @commitlint/cli @commitlint/config-conventional
# add commitlint config
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
# add pre-commit hook
make precommit.rehook

or just type

make init && make precommit.rehook

Environment Prepare

prepare mysql via docker

docker run --name mysql-local \                                                                                                                                     ✔  00:17:00 
  -e MYSQL_ROOT_PASSWORD=mysqlroot \
  -e MYSQL_DATABASE=go-hexagonal \
  -e MYSQL_USER=user \
  -e MYSQL_PASSWORD=mysqlroot \
  -p 3306:3306 \
  -d mysql:latest

Reference