All Projects → pythonzm → blog

pythonzm / blog

Licence: Apache-2.0 license
后端api采用go语言框架gin编写,前端使用vue + element ui编写

Programming Languages

Vue
7211 projects
go
31211 projects - #10 most used programming language
javascript
184084 projects - #8 most used programming language
SCSS
7915 projects
CSS
56736 projects
shell
77523 projects

Projects that are alternatives of or similar to blog

web-marisa
🍄 白丝魔理沙网页版
Stars: ✭ 65 (+44.44%)
Mutual labels:  gin
go-web-demo
基于gin的go web框架。包含log、mysql、redis、httpClient、grpcClient、hystrix 等组件,swagger、pprof集成。
Stars: ✭ 72 (+60%)
Mutual labels:  gin
mir
Mir is a toolkit for register method handler to http engine router(eg: gin,echo,iris,mux,httprouter) use struct tag info.
Stars: ✭ 42 (-6.67%)
Mutual labels:  gin
pink-lady
a template project of gin app.
Stars: ✭ 44 (-2.22%)
Mutual labels:  gin
go-saas
go data framework for saas(multi-tenancy)
Stars: ✭ 101 (+124.44%)
Mutual labels:  gin
gin-api-boilerplate
A Go RESTful API server with gin and docker
Stars: ✭ 16 (-64.44%)
Mutual labels:  gin
logging
mod: zap logging in golang
Stars: ✭ 44 (-2.22%)
Mutual labels:  gin
fizz
🍋 Gin wrapper with OpenAPI 3 spec generation
Stars: ✭ 139 (+208.89%)
Mutual labels:  gin
go-fastapi
Create an API and get Swagger definition for free
Stars: ✭ 76 (+68.89%)
Mutual labels:  gin
ego
Go微服务.A simple and component-based microservice kit for go.
Stars: ✭ 765 (+1600%)
Mutual labels:  gin
logger
Gin middleware/handler to logger url path using rs/zerolog
Stars: ✭ 119 (+164.44%)
Mutual labels:  gin
laya-template
服务基本框架,template
Stars: ✭ 13 (-71.11%)
Mutual labels:  gin
watchman
📆 更夫(watchman)是一款可视化的定时任务配置 Web 工具,麻麻不用担心我漏掉任何更新啦!
Stars: ✭ 40 (-11.11%)
Mutual labels:  gin
goblog
使用golang写的个人博客mirrored from https://gitlab.com/xiayesuifeng/goblog.git
Stars: ✭ 26 (-42.22%)
Mutual labels:  gin
go-docker
Sample code and dockerfiles accompanying the blog post The Ultimate Guide to Writing Dockerfiles for Go Web-apps
Stars: ✭ 89 (+97.78%)
Mutual labels:  gin
White-Jotter-Vue
Front end of White Jotter.
Stars: ✭ 114 (+153.33%)
Mutual labels:  elment-ui
spike
Golang Use Gin Framework implementation of the project
Stars: ✭ 20 (-55.56%)
Mutual labels:  gin
go-realworld-example-app
Exemplary real world application built with Go, Gin, and go-pg
Stars: ✭ 48 (+6.67%)
Mutual labels:  gin
HelloGin
Gin,Vue,Redis,Mysql,Xorm,FastDFS, Hello Gin ! 项目适合入门Gin
Stars: ✭ 62 (+37.78%)
Mutual labels:  gin
kuu
Modular Go Web Framework based on GORM and Gin.
Stars: ✭ 15 (-66.67%)
Mutual labels:  gin

后端API使用gin编写,前端页面使用element-ui,前端直接借鉴了这个大佬的项目:https://github.com/PanJiaChen/vue-admin-template

整体就是以黑白为主,不会做手机适配,所以手机浏览布局会有问题,如果哪位大佬感兴趣做一下手机适配就非常感谢了

线上地址

搜索功能使用elastic做的全文检索,由于租的机器内存比较小,elastic装上跑着有点儿费劲,线上就没有使用搜索功能

Docker快速部署(生产环境)

标准部署

准备

  1. 安装mysql(略)
  2. 安装redis(略)
  3. 安装elastic(略),主要用于全文检索功能,如果不用全文检索可以不安装
  4. 创建blog数据库
mysql> create database blog DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> grant all privileges on blog.* to YOURUSER@'%' identified by 'YOUPASSWORD';
mysql> flush privileges;

安装

  1. go get github.com/pythonzm/blog
  2. 生成数据表
cd backend
bin/goose -dir migrations/ mysql "YOURUSER:YOURPASSWORD@tcp(YOURIP:YOURPORT)/blog?charset=utf8" up

更多goose使用方法,参考:https://github.com/pressly/goose

启动后端

首先修改conf/config.yml中的配置信息

go run main.go

启动前端

cd fronted

  1. npm install
  2. npm run dev

如果出现类似 Command failed: git clone --mirror -q git://github.com/adobe-webplatform/eve.git npm ERR! fatal: read error: Invalid argument 的报错 首先将本地git版本升级到最新的,如果还有问题则执行如下命令 git config --global url."https://".insteadOf git://

构建生产环境

npm run build:prod

访问

前台界面:$YOURIP:9528/#/

后台界面: $YOURIP:9528/#/admin 默认用户名密码:admin/12346

TODO LIST

美化界面

添加文章

image

文章列表

image

前台首页

image

文章详情页

image

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].