1, first need to install the configuration go and git, refer to the following link
Https://www.cnblogs.com/zjwgo/p/9356280.html
2. Installation Configuration Beego
Prerequisite: After installing and configuring the successful go and git, confirm that git bash starts normally
Web Framework Beego Environment:
Step One, install Beego
Click "Start \ All Programs \git\git Bash" and enter "Go get Github.com/astaxie/beego", as
Wait a minute. After the installation is complete, under the Gopath path, the path I gopath here is "C:\mygo\",
You can see the Astaxie folder under the "C:\mygo\pkg\github.com\" and "C:\mygo\src\github.com\" paths, as well as the subordinate Beego folder.
Accidental handling:
1)
Go get Github.com/astaxie/beego
Package golang.org/x/crypto/acme/autocert:unrecognized Import Path "Golang.org/x/crypto/acme/autocert" (HTTPS fetch: Get https://golang.org/x/crypto/acme/autocert?go-get=1:dial TCP 216.239.37.1:443:CONNECTEX:A connection attempt Failed because the connected party does not properly respond after a period of time, or established connection failed Becau SE connected host has failed to respond.
Because it is not possible to access the dependent Autocert package, it is installed in a semi-automatic manner, golang.org has a backup image on the github.com, fortunately GitHub is not blocked, so the missing components we can download on GitHub
We access the missing component in the form of https://github.com/golang/***, and we now access Https://github.com/golang/crypto to download the component
A. According to the instructions for installing the Beego framework, we need to install the component to the $ (gopath)/src/golang.org/x/location, the folder name is crypto, and my host for example, my Gopath directory is D:/goproject
You need to create a completion path D:\goproject\src\golang.org\x\crypto
Completely cut the downloaded Crypto-master directory to the above path: for example D:\GOPROJECT\SRC\GOLANG.ORG\X\CRYPTO\ACME
B. Continue to install----go get github.com/astaxie/beego/, if you encounter other dependency packet error, you can continue to download the package in the above way until the normal installation ends
Step two, install the Bee tool (framework Generation tool)
For a convenient build frame, click "Git Bash" and enter "Go get Github.com/beego/bee"
Also wait a while. When you are finished, under the "gopath\src\github.com\" path, the Beego folder can see the subordinate Bee folder.
At the same time, in the Gopath path of the src sibling bin, there is "Bee.exe" file.
Step three, using the Bee tool to generate the framework engineering code
In start, locate the command prompt, right-run as administrator, enter the SRC path to Gopath, and then enter Bee new project name, as shown in.
The project of such a Beego framework has been built successfully.
Step four, use Liteide to open the run.
Find "Open Directory" in Liteide's "files" and locate the project folder you just created, as
Click "Select Folder" to load the entire project
Clear MVC at a glance. Ctrl+r compiled and executed. Of course you can also set breakpoints for various debugs.
Open the browser and enter "http://127.0.0.1:8080" to see the results of the operation.
To end the run, click the Small red button on the liteide after the "compile output".
3. Update Bee Tools:
Under Git:
get -u github.com/beego/bee
Update Beego:
get -u github.com/astaxie/beego
4. Reference documents
Xie Mengjun, "Go Web Programming"