beego框架

beego官网https://beego.me/,如何安装与配置,首先查看官网提示。

按照提示,在shell中下载安装beego
go get github.com/astaxie/beego
安装bee工具
go get -u github.com/beego/bee
结果报错

sszxrmc:~ sszxr$ go get -u github.com/beego/bee
# github.com/beego/bee
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.
sszxrmc:~ sszxr$ 

最终只能直接下载

sszxrmc:~ sszxr$ git clone https://github.com/beego/bee.git
Cloning into 'bee'...
remote: Enumerating objects: 405, done.
remote: Counting objects: 100% (405/405), done.
remote: Compressing objects: 100% (329/329), done.
remote: Total 4153 (delta 82), reused 329 (delta 64), pack-reused 3748
Receiving objects: 100% (4153/4153), 3.39 MiB | 246.00 KiB/s, done.
Resolving deltas: 100% (2073/2073), done.
sszxrmc:~ sszxr$ 

把下载的文件移动到go/src/github.com/beego下面
然后在go/src目录下用bee命令创建一个项目
bee new hello
项目名称为hello

sszxrmc:src sszxr$ bee new hello
______
| ___ \
| |_/ /  ___   ___
| ___ \ / _ \ / _ \
| |_/ /|  __/|  __/
\____/  \___| \___| v1.10.0
2018/11/09 17:50:41 INFO     ▶ 0001 Creating application...
	create	 /Users/sszxr/go/src/hello/
	create	 /Users/sszxr/go/src/hello/conf/
	create	 /Users/sszxr/go/src/hello/controllers/
	create	 /Users/sszxr/go/src/hello/models/
	create	 /Users/sszxr/go/src/hello/routers/
	create	 /Users/sszxr/go/src/hello/tests/
	create	 /Users/sszxr/go/src/hello/static/
	create	 /Users/sszxr/go/src/hello/static/js/
	create	 /Users/sszxr/go/src/hello/static/css/
	create	 /Users/sszxr/go/src/hello/static/img/
	create	 /Users/sszxr/go/src/hello/views/
	create	 /Users/sszxr/go/src/hello/conf/app.conf
	create	 /Users/sszxr/go/src/hello/controllers/default.go
	create	 /Users/sszxr/go/src/hello/views/index.tpl
	create	 /Users/sszxr/go/src/hello/routers/router.go
	create	 /Users/sszxr/go/src/hello/tests/default_test.go
	create	 /Users/sszxr/go/src/hello/main.go
2018/11/09 17:50:41 SUCCESS  ▶ 0002 New application successfully created!
sszxrmc:src sszxr$ 

进入hello项目,执行命令bee run

sszxrmc:hello sszxr$ bee run
______
| ___ \
| |_/ /  ___   ___
| ___ \ / _ \ / _ \
| |_/ /|  __/|  __/
\____/  \___| \___| v1.10.0
2018/11/09 17:59:42 INFO     ▶ 0001 Using 'hello' as 'appname'
2018/11/09 17:59:42 INFO     ▶ 0002 Initializing watcher...
hello/controllers
hello/routers
hello
2018/11/09 17:59:44 SUCCESS  ▶ 0003 Built Successfully!
2018/11/09 17:59:44 INFO     ▶ 0004 Restarting 'hello'...
2018/11/09 17:59:44 SUCCESS  ▶ 0005 './hello' is running...
2018/11/09 17:59:44.662 [I] [asm_amd64.s:1333]  http server Running on http://:8080




<
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值