创建 API 项目(通过数据库创建 Restful 风格 API 项目)
命令是:
bee api giftPoolstatistictsV3 -conn="root:[email protected](127.0.0.1:3306)/gift_pool"
giftPoolstatistictsV3 是项目名称
root 数据库用户名称
123456 数据库密码
127.0.0.1 数据库地址
gift_pool 数据库
2,API 文档自动化
cd ./giftPoolstatistictV3
bee generate docs
bee run watchall true
go get github.com/go-sql-driver/mysql
查看文档
bee run -gendoc=true -downdoc=true
查看
http://localhost:8080/swagger/
结果
从第二页的图那位置可以看到访问的 HTTP URL。