Your First Hello World Google App Engine Application in 5 mins
Your First Hello World Google App Engine Application in 5 mins
Moving with our series on getting started with Google App Engine in this article we will talk about getting your first Hello World Application running and deployed on the App Engine. We will use python for this example and if you are already well versed in python you can skip the basics and move directly to the deployment steps for App Engine.
Step 1: Download and install the Google App Engine SDK for Python
Here is the link for the windows version.
Step 2: Create a simple helloworld python program
Create a directory named as helloworld
Create a file in this directory as helloworld.py which contains the code below
print 'Content-Type: text/plain'
print ''
print 'Hello, world!'
Create a configuration file called app.yaml in the directory with the following
application: mytestapphelloworld
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
script: helloworld.py
Step 3: Run the Hello World Application using Google App Launcher
Click on Programs Menu and start Google App Launcher
Click onFile Menu -> Add Existing Application
Add the HelloWorld directory as the application
Click Run to start the application and click on Browse to open the web page on the browser
You can also check http://localhost:8080/ to check the live running application
Step 4: Deploy your app on App Engine
Go to the App Engine url at https://appengine.google.com/
Login using your App Engine account that you had created from our earlier exercise
Create a new application by clicking on Create Application button
Use mytestapphelloworld as the application ID. If this is not available use a unique ID that you can remember
Update the app.yaml file with your application ID from above
Change the line below and replace mytestapphelloworld to your application ID.