windows7+go语言+Beego框架安装使用
Go  /  管理员 发布于 4年前   1059
学习go语言,不管三七二十一先找个star高的框架体验一下
1.beego安装
接上一篇文章,git啥都要装这我就不说了,我go环境已经装好,1.15.5
go get github.com/astaxie/beego //git命令下载beego
go get github.com/beego/bee //git命令下载bee工具
GO111MODULE=on //开启
env -w GO111MODULE=on
把GOPATH的bin目录添加到环境变量中
C:\Users\Administrator>bee
Bee is a Fast and Flexible tool for managing your Beego Web Application.
USAGE
bee command [arguments]
AVAILABLE COMMANDS
version Prints the current Bee version
migrate Runs database migrations
api Creates a Beego API application
bale Transforms non-Go files to Go source files
fix Fixes your application by making it compatible with newer versio
ns of Beego
pro Source code generator
dlv Start a debugging session using Delve
dockerize Generates a Dockerfile for your Beego application
generate Source code generator
hprose Creates an RPC application based on Hprose and Beego frameworks
new Creates a Beego application
pack Compresses a Beego application into a single file
rs Run customized scripts
run Run the application by starting a local development server
server serving static content over HTTP on port
update Update Bee
Use bee help [command] for more information about a command.
ADDITIONAL HELP TOPICS
Use bee help [topic] for more information about that topic.
bee的一些介绍
new 命令:
new命令创建一个Web项目,我们在命令下执行bee new <项目名>就可以创建一个新的项目。
api命令:
上面的new命令是用来创建新Web项目,不过很多用户使用beego来开发API应用,所以api命令是用来创建API应用
2.执行命令创建项目 进入D:\goblog\src>目录
D:\goblog\src\gblog>dir
驱动器 D 中的卷是 软件
卷的序列号是 0008-8176
D:\goblog\src\gblog 的目录
2020\12\07 周一 18:00 <DIR> .
2020\12\07 周一 18:00 <DIR> ..
2020\12\07 周一 17:31 <DIR> conf
2020\12\07 周一 17:31 <DIR> controllers
2020\12\07 周一 18:00 13,658,624 gblog.exe
2020\12\07 周一 17:32 195 go.mod
2020\12\07 周一 17:32 5,732 go.sum
2020\12\07 周一 17:31 103 main.go
2020\12\07 周一 17:31 <DIR> models
2020\12\07 周一 17:31 <DIR> routers
2020\12\07 周一 17:31 <DIR> static
2020\12\07 周一 17:31 <DIR> tests
2020\12\07 周一 17:31 <DIR> views
4 个文件 13,664,654 字节
9 个目录 116,428,435,456 可用字节
3.运行 我这里直接用ide 按Ctrl+r运行 看效果咯
浏览器:
122 在
学历:一种延缓就业设计,生活需求下的权衡之选中评论 工作几年后,报名考研了,到现在还没认真学习备考,迷茫中。作为一名北漂互联网打工人..123 在
Clash for Windows作者删库跑路了,github已404中评论 按理说只要你在国内,所有的流量进出都在监控范围内,不管你怎么隐藏也没用,想搞你分..原梓番博客 在
在Laravel框架中使用模型Model分表最简单的方法中评论 好久好久都没看友情链接申请了,今天刚看,已经添加。..博主 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 @1111老铁这个不行了,可以看看近期评论的其他文章..1111 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 网站不能打开,博主百忙中能否发个APP下载链接,佛跳墙或极光..
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号