Skip to content

Commit

Permalink
示例配置加上注释
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbbbbbbbbbbba committed Jul 1, 2019
1 parent d43f338 commit 4f410d0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 34 deletions.
30 changes: 7 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,13 @@
> 本人日常开发的主力语言为Java,因为对golang的兴趣,所以才边学边写了该项目,完全是为了学习。
# 使用帮助
[https://mlog.club/topic/17](https://mlog.club/topic/17)

## 技术栈
# 问题反馈

- iris (https://github.com/kataras/iris) mvc框架
- gorm (http://gorm.io/) orm框架
- resty (https://github.com/go-resty/resty) 好用的http-client
- cron (https://github.com/robfig/cron) 定时任务
- goquery(https://github.com/PuerkitoBio/goquery)html dom元素解析
- Element-UI (https://element.eleme.cn) 饿了么开源的基于vue.js的前端库
- vditor (https://github.com/b3log/vditor) Markdown编辑器
[https://mlog.club/topics](https://mlog.club/topics)

# 交流群

## startup
扫码加好友进群交流,加好友请备注:`mlog`

1. 打开根目录下的mlog.json,配置自己的数据库,只需要创建好库就可以,表会自动为你创建。
2. 根目录下执行:`go mod tidy`将所有需要依赖的库下载到本地。(依赖管理使用了go mod,不会用的请看这里:https://mlog.club/topic/9)
3. 执行`go run main.go`启动项目

## 注意事项

- 后台管理项目使用vue+element-ui编写,采用前后端分离方案,后台工程在`web/admin`请自行编辑。

## 如有问题,请反馈到这里:

https://mlog.club/topics

## 加好友进群交流
![](https://i.loli.net/2019/06/25/5d11effb3458934717.png)

25 changes: 15 additions & 10 deletions mlog.example.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
Env: prod
BaseUrl: https://mlog.club
SiteTitle: M-LOG
Port: '8082'
ShowSql: false
ViewsPath: "./web/views"
StaticPath: "./web/static"
Env: prod # 环境,线上环境:prod、测试环境:dev
BaseUrl: https://mlog.club # 网站域名
SiteTitle: M-LOG # 网站标题
Port: '8082' # 端口
ShowSql: false # 是否打印sql
ViewsPath: "./web/views" # views模版文件目录,可配置绝对路径
StaticPath: "./web/static" # 静态文件目录,可配置绝对路径

MySqlUrl: root:xxx@tcp(localhost:3306)/mlog_db?charset=utf8&parseTime=True&loc=Local
RedisAddr: 127.0.0.1:6379
MySqlUrl: username:password@tcp(localhost:3306)/mlog_db?charset=utf8&parseTime=True&loc=Local # 数据库链接
RedisAddr: 127.0.0.1:6379 # redis链接

# oauth服务端配置
OauthServer:
AuthUrl: https://mlog.club/oauth/authorize
TokenUrl: https://mlog.club/oauth/token

# oauth客户端配置
OauthClient:
ClientId: xxx
ClientSecret: xxx
ClientRedirectUrl: https://mlog.club/oauth/client/callback
ClientSuccessUrl: https://admin.mlog.club/mlog/login_success.html

# github登录配置
Github:
ClientID:
ClientSecret:

# 阿里云oss配置
AliyunOss:
Host: xx
Host: oss-cn.aliyuncs.com
Bucket: bucket-name
Endpoint: xx
AccessId: xx
AccessSecret: xx

# 邮件服务器配置
Smtp:
Addr: smtp.qq.com
Port: '25'
Expand Down
2 changes: 1 addition & 1 deletion web/views/topic/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<span>{{.Topic.ViewCount}}</span>
{{if .Topic.Tags}}
{{range .Topic.Tags}}
<span class="tag"><a href="#" target="_blank">{{.TagName}}</a></span>
<span class="tag"><a href="javascript:void(0)" target="_blank">{{.TagName}}</a></span>
{{end}}
{{end}}
<span><i class="iconfont icon-favorite"></i><a
Expand Down

0 comments on commit 4f410d0

Please sign in to comment.