Beego Setup and installation on Windows server
To start the installation process, first you need to download Git for Windows and update below required settings for GO environment variables.
-
Go the the link https://git-scm.com/download/win and download the latest version Git for Windows.
Once you click on the Download button for the latest Git for Windows version, the installation exe will be saved to your hard disk. Locate the exe that you've just downloaded and run it. Follow the step of installation; once the installation completed you can verify by right click on desktop or any folder. As per below screen-shot.
The Go-environment works with a small number of OS environment variables. They are best defined before the installation starts; on Windows you will have to create the empty Go root map first, like C:/Go.
GOPATH is a folder in which we will install Beego Framework.
To set GOPATH variables first create new folder in C: drive and update in GOPATH environment variable.Note: GOPATH folder should not be folder of GOROOT otherwise you will get the error "$GOPATH must not be set to $GOROOT".Here are the most important:GOROOT: is the root of the go tree (or installation)GOPATH: build and install packages outside the standard Go treeGOBIN : the location where the binaries (compiler, linker, etc.) are installed
After download completes you can see 2 new folders in Goweb folder "pkg" and "src". This will shows that Beego framework has been downloaded successfully on our server.
Now, we need to install bee tool (bee tool is a project that helps developing Beego rapidly. With bee tool we can create, auto compile and reload, develop, test, and deploy Beego applications easily). [It's just like Php artisan for Laravel in Php.]
From command prompt Go to the C:\Go\bin
From command prompt Go to the C:\Goweb
In C:\Goweb\src you will see newly created folder "demoProject"
From command prompt Go to the C:\Goweb\src\demoProject
System will display now alert box just click on "Allow access". Now, go to browser and hit the url "http://localhost:8080/".