In this lesson, we will confirm the correct installation of the App Engine development environment. This example is just a copy of the first Hello, World application from the App Engine web site. From the command line, execute the following command to run the development web server using the Hello, World application:
Note: When running Python 2.6 on your client, you will see a Deprecation Warning: ... the sha module is deprecated... or ... the md5 module is deprecated. I haven't found a fix for this - but I think it can be safely ignored.
Then, open a web browser to
While you can run your application from the command line, you'll probably find it easier to run the development server from within Eclipse (to kill the command line server, hit CTRL-C, then F5 (refresh) the browser window, and type Y to Terminate the batch job).
- New Project/Pydev/Pydev Project
- Project name: hello-cgi
Grammer Version: 2.5
Google App Engine Directory: C:\Program Files\Google\google_appengine
Uncheck "create default src folder"
- Delete src directory (won't be used)
- Right click hello-cgi
Link to folder: C:\src\aebootcamp\lessons
- Run/Run Configurations
Python Run - New (upper left icon)
- Project: hello-cgi
- Main module: C:\Program Files\Google\google_appengine\dev_appserver.py
- Program Arguments: -p 80 --clear_datastore hello-cgi
- Working Directory: C:\src\aebootcamp\lessons
You can also run applications using Google's App Engine Launcher (you will find the program icon on your desktop):
- File/Add Existing Application: c:\src\aebootcamp\lessons\hello-cgi
Deploying to App Engine (*.appspot.com)
You can now deploy your app to the hosted App Engine to run it from the server.
- Click Edit (or open app.yaml) to change your application id to be unique:
- Click the Deploy button in the Launcher
You can alternatively do command line deployment:
- Test your hosted application: e.g., http://hello-cgi.latest.aebootcamp-mckoss.appspot.com/
Note: I'm using a little trick here. Normally, your app will be hosted at <your-app>.appspot.com. But note that multiple versions of your app can be hosted at the same time. They all share the same data - but can be running different code. I take advantage of the fact that the version name of an application can be any string (in this case "hello-cgi"). The URL above is loading the hello-cgi *version* of the aebootcamp-mckoss application. This allows me to run all the sample applications for this course as different versions of the same application.