1 Star 0 Fork 0

shellgithub/liteblog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-2-Clause

GoLang 开发 liteblog 练习与学习笔记

相关文档地址

非常感谢

bee 工具简介

bee 工具是一个为了协助快速开发 beego 项目而创建的项目,通过 bee 您可以很容易的进行 beego 项目的创建、热编译、开发、测试、和部署。

bee 工具的安装

您可以通过如下的方式安装 bee 工具:

# 先配置 GOPATH
mkdir -p $HOME/go
export GOPATH=$HOME/go
echo 'export GOPATH=/data/go/' >> ~/.zshrc

# 下载 beego
go get -u github.com/beego/bee/v2

# 配置 PATH
export PATH=$PATH:$GOPATH/bin
echo 'export GOPATH=/data/go/' >> ~/.zshrc
echo 'export PATH=$PATH:$GOPATH/bin' >> ~/.zshrc

安装完之后,bee 可执行文件默认存放在 $GOPATH/bin 里面,所以您需要把 $GOPATH/bin 添加到您的环境变量中,才可以进行下一步。

如果你本机设置了 GOBIN,那么上面的bee命令就会安装到 GOBIN 目录下,所以我们需要在环境变量中添加相关的配置信息,如何添加可以查看这篇文档: bee 环境变量配置

bee 工具命令详解

我们在命令行输入 bee,可以看到如下的信息:

go get -u github.com/beego/bee/v2
cd $GOPATH/src  

go get github.com/beego/bee
go get github.com/astaxie/beego
go get github.com/shiena/ansicolor

bee new liteblog

cd $GOPATH/src/liteblog
go run main.go

下载 博客模版(使用QQ登录可以下载)

https://www.sucainiu.com/5921.html

表单生成工具地址

https://www.layui.com/demo/form.html

使用代理下载依赖包

go env -w GOPROXY="https://goproxy.cn,direct"
go env -w GOPROXY="https://goproxy.cn,https://mirrors.aliyun.com/goproxy/,https://goproxy.io,direct"

下载 gorm

go get -u gorm.io/gorm
go get -u gorm.io/driver/sqlite

下载 orm

go get github.com/beego/beego/v2/client/orm
go get github.com/go-sql-driver/mysql@v1.5.0

添加依赖模块

初始化依赖模块
go mod init

添加依赖模块
go mod tidy

下载wangEditor

# 视频中的版本
https://github.com/wangeditor-team/wangEditor/archive/refs/tags/v3.1.1.tar.gz

# 当前最新版本 2021-03-26
https://github.com/wangeditor-team/wangEditor/archive/refs/tags/v4.6.12.tar.gz

UUID

  • 2021-03-26
go get github.com/satori/go.uuid

net

  • 2021-03-27--2021-03-29
go get -u -v golang.org/x/net
go get github.com/PuerkitoBio/goquery

mapstructure

  • 2021-03-29
go get github.com/goinggo/mapstructure
BSD 2-Clause License Copyright (c) 2021, shellgithub All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

GoLang 开发 liteblog 练习与学习笔记 展开 收起
README
BSD-2-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/shellgithub/liteblog.git
git@gitee.com:shellgithub/liteblog.git
shellgithub
liteblog
liteblog
main

搜索帮助