1 Star 0 Fork 0

Vincent/Bubble

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.go 320 Bytes
一键复制 编辑 原始数据 按行查看 历史
Vincent 提交于 2022-08-02 16:43 . 清单项目
package main
import (
"demo/dao"
"demo/models"
"demo/routers"
)
func main() {
err := dao.InitMySQL()
if err != nil {
panic(err)
}
defer dao.Close() //程序退出关闭数据库连接
//2.把模型与数据库中的表对应起来
dao.DB.AutoMigrate(&models.Todo{})
r := routers.SetupRouter()
r.Run()
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/Vincentstudy/bubble.git
git@gitee.com:Vincentstudy/bubble.git
Vincentstudy
bubble
Bubble
master

搜索帮助

Cb406eda 1850385 E526c682 1850385