Win7 Revel installation of Go web

Source: Internet
Author: User

Then the last record of the Win7 Go environment, go development, now in addition to sublime, liteide more recommended, download links

After downloading the installation directly, you need to configure the next go environment (this machine is using Windows 386 version), as follows:

Open the file configuration in the following places:

Next, create a new CMD program test:

Create a simple "command line" program here, the project location defaults to Gopath below, here is "main", click "OK", Liteide automatically generate a Go main file:

Direct shortcut key "Ctrl+r" run, print as follows:

This explains the success of the execution!

Go Web framework is not many, the mainstream of the Beego (written by the Chinese, the domestic heat, belonging to the heavyweight framework, modular, feature-rich), Revel (a high-productivity go language WEB framework, take full advantage of Go goroutine), Martini, This records the installation of the Revel (Win7 64):

First is the download:

$ go Get github.com/revel/revel // Install Revel Framework    $ go get github.com/revel/cmd/revel      // Installing Revel cmd command-line tools

Because the domestic Google by the wall, the installation will report the following questions:

Hint missing go websocket package, here to download manually:

Http://code.google.com/p/go/source/browse/?repo=net

Download the zip version of the extract directly (the path must be correct):

Then execute the following command in the cmd window:

To see if it was successful:

Instructions to install successfully!

Next, try creating a new Web App:

Run the MyApp application:

This shipment starts an HTTP service with a port default of 9000 and direct browser access:

OK, so far, the Revel app was created and started successfully!

The directory structure created by Revel is as follows, implementing the MVC idea:

At this point, the record is complete!

Win7 Revel installation of Go web

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.