Skip to content

Commit

Permalink
Update README.md:增加启动说明
Browse files Browse the repository at this point in the history
  • Loading branch information
imageslr authored Oct 10, 2019
1 parent 8344ecc commit 8d5415b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,31 @@
</code></pre>
</details>

## 启动
```
# 需先安装 fresh (https://github.com/gravityblast/fresh)
# go get github.com/pilu/fresh
# 启动前建议配置环境变量: GOPROXY=https://goproxy.io
cd gin_bbs
cp ./config.example.yaml ./config.yaml
make dev # 或者也可直接 fresh -c ./fresh.conf
# 项目相关命令参见 Makefile
```

数据库配置需要修改 `config.yaml`
```
DB:
CONNECTION: mysql
HOST: 127.0.0.1
PORT: 3306
DATABASE: gin_bbs
USERNAME: your_username
PASSWORD: your_password
```
如果运行的是 debug 模式,数据库名应该为 `gin_bbs_debug`

## 实现功能
- [x] CSRF 验证
- [x] flash 消息闪现
Expand Down

0 comments on commit 8d5415b

Please sign in to comment.