一个基于gin+gorm开发的备忘录
一个基于gorm增删改查的web小程序
git clone https://github.com/gopherer/Bubble.git
1.在Mysql中执行一下代码创建项目所需的数据库:
CREATE DATABASE bubble DEFAULT CHARSET=utf8mb4;
2.在bubble/conf/config.ini文件中按如下提示配置数据库连接信息。 `
port = 80
release = false
[mysql]
user = 你的数据库用户名
password = 你的数据库密码
host = 你的数据库host地址
port = 你的数据库端口
db = bubble
`
新增bubble/conf/config.json
使用json文件保持项目配置
go build -o bubble.exe .\main.go
./bubble conf/config.ini
亦或
./bubble conf/config.json
但需要启动注释中的代码
在浏览器输入 localhost
浏览器默认访问80端口 localhost 是127.0.0.1的别名