- 在项目中引入 GORM 相关依赖 - 添加 GORM代码生成工具 gen.go - 更新 MySQL 数据库配置 - 新增 .env 文件到 .gitignore
*** Project
introduce
- Use the Kitex framework
- Generating the base code for unit tests.
- Provides basic config functions
- Provides the most basic MVC code hierarchy.
Directory structure
catalog | introduce |
---|---|
conf | Configuration files |
main.go | Startup file |
handler.go | Used for request processing return of response. |
kitex_gen | kitex generated code |
biz/service | The actual business logic. |
biz/dal | Logic for operating the storage layer |
How to run
sh build.sh
sh output/bootstrap.sh