In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
Today, the editor will share with you the relevant knowledge points about how to build the golang beego framework environment. The content is detailed and the logic is clear. I believe most people still know too much about this, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
Environment building
Download and install beego,bee
1. Open the gomod setting agent go env-w GO111MODULE=ongo env-w GOPROXY= https://goproxy.cn2. Install beego and beego get-u-v github.com/astaxie/beegogo get-u-v github.com/beego/bee3. Upgrade beebee update4.zsh: command not found: copy the bee.exe under beeGOPATH/bin into GOROOT/bin, that is, the bin of your go language environment variables, and then run the bee5.bee command bee new name / / create the project bee version / / print the current Bee version bee migrate / / run database migration bee api name / / create a BeegoAPI application bee run / / project compilation, and the project starts bee pack / / executes in the project directory Package the project zip package bee generate / / this command automatically generates the code bee dockerize. / / generate dockerfile files to implement the application docerization bee bale / / convert non-go files into go source files bee fix / / repair the application bee pro / / source generator bee update by making the application compatible with newer versions of Beego. / / Update bee6. When the project starts, go to the project directory and execute the bee run command, and enter the URL: 127.0.0.1 8080 in the browser, which is shown as follows:
7.beego Project structure Analysis quickstart / / Project name |-- conf / / Project-related configuration folder | |-- app.conf |-- controllers / / main business code | |-- default.go |-- models / / storing database-related content |-- routers / / storing routing files | |-- router.go |-- static / / storing static resources | |-- css | |-- img | |-- js |-- tests | / / Test file | |-- default_test.go |-- views / / View file |-- index.tpl |-- main.go are all the contents of the article "how to build a golang beego Framework Environment" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.