Skip to content

Files

Latest commit

ddc0fda · Jul 19, 2023

History

History
60 lines (45 loc) · 756 Bytes

readme.adoc

File metadata and controls

60 lines (45 loc) · 756 Bytes

Golang web application

Golang web multi module application by DDD/TDD

How to create module

  • create a folder and init module

$ mkdir demo && cd demo
$ go mod init  demo
  • update go.work

How to build

  • install podman/podman-compose

  • edit dotenv

DB_HOST=localhost
DB_NAME=gforum
DB_PORT=3306
DB_USER=forum
DB_PASSWORD=secret
  • load .env file

export $(grep -v '^#' .env | xargs)
  • install tools

task tools
  • gen entity from sql

➜ task dbimport
➜ task start-mysql
➜ task importSql # for dev purpose only
➜ task codegen
➜ task stop-mysql
  • build application

task forum:build