Introduction
Google App Engine is the platform for building web application. There's a built-in framework and already hosting servince provided by Google. The application environtment is two: Java and Python. Whenever you choose one, it's up to you.
How To
To starting development, you can download it first from code.google.com. Here we use Python version environment. After finishing for downloading, please install it.
The first is create directory, named "Hello" in whatever you want to place it - for example in "D:\\Hello". The second, is create two files: app.yaml and main.py, and then write this code.
app.yaml
application: hello
version: one
runtime: python
api_version: 1
handlers:
- url: /.*
script: main.py
version: one
runtime: python
api_version: 1
handlers:
- url: /.*
script: main.py
main.py
print 'Content-Type: text/html'
print ''
print '<h1>Hello World From GAE!</h1>'
print ''
print '<h1>Hello World From GAE!</h1>'
Input: command line
C:\\Program Files\\Google\\google_appengine\\dev_appserver.py D:\\Hello
Output: command line
INFO 2011-05-10 16:44:52,967 appengine_rpc.py:158] Server: appengine.google.com
INFO 2011-05-10 16:44:53,015 appcfg.py:437] Checking for updates to the SDK.
****************************************************************
There is a new release of the SDK available.
-----------
Latest SDK:
api_versions: ['1']
release: 1.5.0
timestamp: 1301428458
-----------
Your SDK:
api_versions: ['1']
release: 1.4.3
timestamp: 1298921951
-----------
Please visit http://code.google.com/appengine for the latest SDK
****************************************************************
INFO 2011-05-10 16:44:55,812 rdbms_sqlite.py:58] Connecting to SQLite databa
se '' with file 'c:\\docume~1\\mahasi~1\\locals~1\\temp\\dev_appserver.rdbms'
WARNING 2011-05-10 16:44:55,828 dev_appserver.py:4394] Could not initialize ima
ges API; you are likely missing the Python "PIL" module. ImportError: No module
named _imaging
INFO 2011-05-10 16:44:55,890 dev_appserver_main.py:543] Running application
lola on port 8080: http://localhost:8080
INFO 2011-05-10 16:44:53,015 appcfg.py:437] Checking for updates to the SDK.
****************************************************************
There is a new release of the SDK available.
-----------
Latest SDK:
api_versions: ['1']
release: 1.5.0
timestamp: 1301428458
-----------
Your SDK:
api_versions: ['1']
release: 1.4.3
timestamp: 1298921951
-----------
Please visit http://code.google.com/appengine for the latest SDK
****************************************************************
INFO 2011-05-10 16:44:55,812 rdbms_sqlite.py:58] Connecting to SQLite databa
se '' with file 'c:\\docume~1\\mahasi~1\\locals~1\\temp\\dev_appserver.rdbms'
WARNING 2011-05-10 16:44:55,828 dev_appserver.py:4394] Could not initialize ima
ges API; you are likely missing the Python "PIL" module. ImportError: No module
named _imaging
INFO 2011-05-10 16:44:55,890 dev_appserver_main.py:543] Running application
lola on port 8080: http://localhost:8080
No comments:
Post a Comment