Google App Engine 6-step tutorial

Source: Internet
Author: User

Each appProgram500 mb of persistent storage space, 5 million views per month

Procedure for using Google App Engine

1. Account Application
If you do not have a Google App Engine account, you need to create one on this website. Http://appengine.google.com/

2. Create an Application ID.
After logging on to the Google App Engine account, you need to create an Application ID. Now it seems that you can create 10 applicaiton IDs for each account. All the applications uploaded later must be bound with an Application ID.
If one of your IDS is <Application ID 1>, other users can access your application through http: // <Application ID 1> .appspot.com.
One of my IDS is iloveagile, so you can visit http://h2o.appspot.com/goto see the simple samples.
By the way, you need to enter the mobile phone number when creating the Application ID. Google will send the login ID to your mobile phone. For Mainland China, the input format of this mobile phone number is + 86 13520668668.

3. download and install the development environment
Google App Engine requires only two development items: Google App Engine SDK and python. My development platform is windows and uses the following two versions (Googleappengine 1.1.9+Python-1, 2.6.1)
Googleappengine_1.1.9.msi, Click to download
Python 2.6.1 released: 081204:Click to download
The two installation packages can be installed after confirmation on Windows. Other platforms have not yet tried. The installation directory is default (C: \ Program Files \ google \ google_appengineAndC: \ python26)

4. Development
Create a helloworld directory in the c: \ Program Files \ google \ google_appengine directory. use NotePad to create two files: helloworld. py and App. yaml;

 
The content of helloworld. py is as follows:Print 'content-type: text/plain 'print ''' print 'hello, world! 'The content of APP. yaml is as follows:Application: helloworldversion: 1 runtime: pythonapi_version: 1 handlers:-URL:/. * Script: helloworld. py For details, see: http://code.google.com/intl/zh-CN/appengine/docs/python/gettingstarted/

5. Local debugging

After writing the Python code, you can run it. Open the "Start Menu" and run cmd. Switch to c: \ Program Files \ google \ google_appengine.

Then enter the command line dev_appserver.py helloworld.

When "on port 8080: http: // localhost: 8080" is displayed in the last line of the result, you can enter "http: // localhost: 8080" in IE to access the service;

The cmd black window is closed and becomes invalid;

6. Upload the application to the server.

Enter cmd, open the command line black window, enter "cd c: \ Program Files \ google \ google_appengine" to switch to the google_appengine directory, and then enter appcfg. PY update helloworld will prompt you to enter the email and password. Then, you can enter the Google account and password to complete the upload;

Because helloworld is the appid retained by the system, we need to modify our own appid. Open app. yaml and modify application: helloworld to application: <your application ID> to upload the file successfully.

Access address: http: // <your application ID> .appspot.com/

The cmd command is as follows:

Cd c: \ Program Files \ google \ google_appengine

Appcfg. py update H2O

Appcfg. py rollback H2O

original article link: http://xuc.freeoda.com/blog/2009/07/23/google-app-engine-getting started/

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.