Beego is a fast-developing HTTP framework for GO applications that can be used to quickly develop applications such as APIs, Web and backend services, and is a RESTful framework designed to be inspired by the three frameworks of tornado, Sinatra and flask, but with the go A framework designed for some of its own characteristics (interface, struct embedding, etc.).
1, the installation of Beego
Go get Github.com/astaxie/beego
More installation information: https://beego.me/docs/install/
2. Installation of Bee Tools
Go get Github.com/beego/bee
After installation, the bee executable is stored by default in the $GOPATH/bin, so you need to add $GOPATH/bin to your environment variables before you can proceed to the next step, as follows:
Export path= $PATH:/home/www/golang/gopath/bin/linux_386
question: How can I come out with a linux_386 (?? )
If the environment variable is not installed successfully, the following conditions will occur
Bee New Hellono command'Bee'found, did you mean:command'Tee'From package'coreutils'(main) Command'Beef'From package'Beef'(Universe) Command'Ree'From package'Ree'(Universe) Command'Btee'From package'Ruby-bcat'(Universe) Command'Beer'From package'Gerstensaft'(Universe) Command'Pee'From package'moreutils'(Universe) Command'BBE'From package'BBE'(Universe) Command' be'From package'Bugs-everywhere'(Universe) Command'Beep'From package'Beep'(Universe) Command' See'From package'Mime-support'(main) Command'Ben'From package'Ben'(Universe) Command'Bel'From package'Belier'(Universe) Command'Beet'From package'Beets'(Universe) Bee:command not found
3. Create a project
Bee New Hello
4, the implementation of the project
Remember: To enter the new project you just created Hello
/home/www/golang/gopath/src/hello/[email protected]:lsconf controllers Main.go models Routers static tests Views[email protected]:~/golang/gopath/src/hello$ Bee Run
5. Open the browser to see the effect
6. Video Tutorial
http://edu.51cto.com/center/course/lesson/index?id=24341
Golang Getting Started Tutorial (iii) Beego rapid development of the HTTP framework