Google App Engine Golang tutorial

Source: Internet
Author: User
Tags goagent golang tutorial
This is a creation in Article, where the information may have evolved or changed.
    1. Apply Google App Engine ID specific steps to ask Google

    2. Deploy a goagent, or you're not going to be on the mainland. Step through the steps below to ask Google

    3. Download GO_APPENGINE_SDK, test under Windows, the next version is go_appengine_sdk_windows_386-1.8.8

    4. Download Python 2.7.6 http://www.python.org/download/releases/2.7.6/

    5. One of the most wasteful steps of my time: Uninstall Alibaba delete the "Alibaba accepted files" in the registration table

      Of course there is a better solution to this step, and there is no careful study

    6. Coding

      Hello/hello.go

Package Helloimport ("FMT" "Net/http") func init () {http. Handlefunc ("/", Handler)}func handler (w http.) Responsewriter, R *http. Request) {fmt. Fprint (W, "Hello, xxx!")}

App.yaml

application:xxxversion:1runtime:goapi_version:go1handlers:-URL:/.* script: _go_app


7. Compiling test Runs

Copy the code and YAML to the app directory

Directory structure

app/

Hello/hello.go

App.yaml

dev_appserver.py app/

It's all right to visit http://localhost:8080/

You should see it on the web.

Hello, xxx!.


8. Upload App

appcfg.py Update App

9. Access your app (provided that you run Goagent)

http://yourappid.appspot.com/



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.