本项目是一个个人博客系统,能够实现后台写文章、发动态、发布项目、文章分类管理、评论管理,以及前台文章的分页展示、分类展示、动态的展示以及评价,还有项目的展示,以及留言和个人简历的展示。
1.前端采用了vue框架,前台页面继承了vuesax组件库、后台继承了element-ui组件库,对后端发送axios请求获取数据(前台界面参考于别人) 2.后端采用了golang的gin框架,采用gorm框架对mysql进行操作,采用了日志库和日志分割作为gin的中间件来记录日志,利用cors进行跨域访问,采用jwt进行后台登陆的鉴权 3.将项目部署在docker容器中
docker下的安装(无需go环境,需要安装docker,并在docker中拉取启动mysql:5.6并创建数据库myblog):
- 修改config下的config.ini文件
- 进入文件所在的文件夹,执行docker build -f Dockerfile -t myblog .
- 执行 docker run -p 3000:3000 -d myblog
- 前台网页访问localhost:3000,后台网页访问localhost:3000/admin
直接安装访问(需要配置go环境,并安装mysql:5.6,创建数据库myblog):
- 修改config.ini文件
- 执行命令go mod download下载go依赖包
- go run main.go执行
- 前台网页访问localhost:3000,后台网页访问localhost:3000/admin
- 需要在windows下或者docker下安装mysql
- 如果主机名不是localhost,需要修改config/config.ini并修改前端axios的baseURL后重新打包
- Fork 本仓库
- 新建 Feat_xxx 分支
- 提交代码
- 新建 Pull Request
- 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
- Gitee 官方博客 blog.gitee.com
- 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
- GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
- Gitee 官方提供的使用手册 https://gitee.com/help
- Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/