Build your first go Web environment with Revel

Source: Internet
Author: User
Tags install go
This is a creation in Article, where the information may have evolved or changed.

Use advanced technology to build a go web development environment

1. Installing the Go language does not introduce too much here, just execute the following command
Brew Install Go
2. Configure Gopath to add the following configuration in/etc/profile
export gopath= "/USR/LOCAL/CELLAR/GO/1.5.1/" Export path= "/usr/local/cellar/go/1.5.1/bin: $PATH"
Where the/USR/LOCAL/CELLAR/GO/1.5.1/directory is the local go installation directory 3. Install Revel
go get github.com/revel/revel go get github.com/revel/cmd/revel
ifEncountered installation is not successful live dependent import error issues, you can refer to the Golang Chinese community across the wall to download and execute the installation Components 4. Create a web App with Revel
Revel new App
In this case, you can see the following structure in the Gopath directory
app/code.google.com/github.com/golang.org/gopkg.in/
Execute the following command
Revel new App
We'll see it on the console.
~ ~ revel! Http://revel.github.io ~ Info 2015/11/24 00:34:20 revel.go:329:loaded module Testrunner Info 2015/11/24 00:34:20 revel.go:329:loaded module Static INFO 2015/11/24 00:34:20 revel.go:206:initialized Revel v0.12.0 (2015-03-25) For >= go1.3 info 2015/11/24 00:34:20 run.go:57:running app (apps) in dev mode INFO 2015/11/24 00:34:20 harness.go:165 : Listening on:9000
Access the browser (http://localhost:9000) to see It WorksThe screen from this, a standard go Web application will be generated, we can be on top of the dashing play up, enjoy it, Let ' s go!
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.