# go-blog **Repository Path**: shone6/go-blog ## Basic Information - **Project Name**: go-blog - **Description**: 使用golang开发的一个个人博客,前后端分离 - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-04-04 - **Last Updated**: 2022-04-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # go-blog #### 介绍 使用golang开发的一个个人博客,前后端分离 #### 软件架构 ``` ├─ .gitignore │ go.mod // 项目依赖 │ go.sum │ LICENSE │ main.go //主程序 │ README.md │ sql.sql //数据库文件 ├─controller //控制层 ├─config // 项目配置入口 ├─database // 数据库备份文件(初始化) ├─log // 项目日志 ├─middleware // 中间件 ├─model // 数据模型层 ├─routes │ router.go // 路由入口 ├─static // 打包静态文件 │ ├─admin // 后台管理页面 (已废弃,打包静态文件在web/admin/dist下) │ └─front // 前端展示页面 (已废弃,打包静态文件在web/front/dist下) ├─upload ├─utils // 项目公用工具库 │ │ setting.go │ ├─errmsg │ └─validator └─web // 前端开发源码(VUECLI项目源文件) ├─admin └─front ``` 运行&&部署 1.克隆项目 `git clone https://gitee.com/shone6/go-blog.git` 2.转到下面文件夹下 `cd yourPath/ginbolg` 3.安装依赖 `go mod tidy` 4.初始化项目配置 config.ini 5.在database中将sql文件导入数据库 6.启动项目 `go build main.go` `go run main.go` 此时,项目启动,你可以访问页面 首页 http://localhost:3000 后台管理页面 http://localhost:3000/admin 用户名:admin 密码:123456 实现功能 简单的用户管理权限设置 用户密码加密存储 文章上传 自定义文章分类 图片上传(七牛云) JWT 认证 自定义日志功能 跨域 cors 设置 文章评论