创建第一个beego项目

进入目录/home/zhuzi/go/src
cd /home/zhuzi/go/src

利用bee命令创建helloworld项目
bee new helloworld

控制台输出以下内容

        create   /home/zhuzi/go/src/helloworld/go.mod
      create   /home/zhuzi/go/src/helloworld/
      create   /home/zhuzi/go/src/helloworld/conf/
      create   /home/zhuzi/go/src/helloworld/controllers/
      create   /home/zhuzi/go/src/helloworld/models/
      create   /home/zhuzi/go/src/helloworld/routers/
      create   /home/zhuzi/go/src/helloworld/tests/
      create   /home/zhuzi/go/src/helloworld/static/
      create   /home/zhuzi/go/src/helloworld/static/js/
      create   /home/zhuzi/go/src/helloworld/static/css/
      create   /home/zhuzi/go/src/helloworld/static/img/
      create   /home/zhuzi/go/src/helloworld/views/
      create   /home/zhuzi/go/src/helloworld/conf/app.conf
      create   /home/zhuzi/go/src/helloworld/controllers/default.go
      create   /home/zhuzi/go/src/helloworld/views/index.tpl
      create   /home/zhuzi/go/src/helloworld/routers/router.go
      create   /home/zhuzi/go/src/helloworld/tests/default_test.go
      create   /home/zhuzi/go/src/helloworld/main.go
2020/10/21 11:44:48 SUCCESS ▶ 0003 New application successfully created!

进入helloworld项目根目录

cd helloworld/

启动helloworld项目

bee run

控制台输出以下内容

______
| ___ \
| |_/ / ___   ___
| ___ \ / _ \ / _ \
| |_/ /| __/| __/
\____/ \___| \___| v1.11.0
2020/10/21 11:44:57 INFO     ▶ 0001 Using 'helloworld' as 'appname'
2020/10/21 11:44:57 INFO     ▶ 0002 Initializing watcher...
go: downloading gopkg.in/yaml.v2 v2.2.1
go: finding module for package github.com/shiena/ansicolor
go: downloading github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18
go: found github.com/shiena/ansicolor in github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18
github.com/astaxie/beego/config
gopkg.in/yaml.v2
github.com/shiena/ansicolor
github.com/astaxie/beego/session
github.com/astaxie/beego/logs
github.com/astaxie/beego/grace
github.com/astaxie/beego/context
github.com/astaxie/beego/toolbox
github.com/astaxie/beego/context/param
github.com/astaxie/beego
helloworld/controllers
helloworld/routers
helloworld
2020/10/21 11:45:10 SUCCESS ▶ 0003 Built Successfully!
2020/10/21 11:45:10 INFO     ▶ 0004 Restarting 'helloworld'...
2020/10/21 11:45:10 SUCCESS ▶ 0005 './helloworld' is running...
2020/10/21 11:45:10.538 [I] [asm_amd64.s:1374] http server Running on http://:8080

到此为止,GoLang环境及Beego框架安装和配置完成