golang自学之路(beego框架)4

下载
go get github.com/astaxie/beego
go get github.com/beego/bee
更新,加上(-u),如下:

go get -u github.com/beego/bee

需要把gopath的bin目录加入path,否则bee命令无法执行。

C:\Users\73922>bee version
______
| ___ \
| |_/ /  ___   ___
| ___ \ / _ \ / _ \
| |_/ /|  __/|  __/
\____/  \___| \___| v1.9.1

├── Beego     : 1.9.2
├── GoVersion : go1.9.2
├── GOOS      : windows
├── GOARCH    : amd64
├── NumCPU    : 4
├── GOPATH    : D:\go_workspace
├── GOROOT    : D:\go\
├── Compiler  : gc

└── Date      : Monday, 9 Apr 2018

成功!

只需要运行

包含 beego.Run()的main.go文件即可访问。http://localhost:8080/

猜你喜欢

转载自blog.csdn.net/qq_33230584/article/details/79862701