As part of the Udacity’s web developement course, the problem set 1 required the online student to submit his/her first web app by using Goole app engine. Here are my step-by-step to make “hello word” (actually it is “hello udacity”) application by using Google app engine (python version) on Ubuntu 12.04.
What is Google App Engine? From the Google definition, Google App Engine lets you run web applications on Google’s infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. With App Engine, there are no servers to maintain: You just upload your application, and it’s ready to serve your users
- Download the Google App Engine from http://code.google.com/appengine/downloads.html
- Install the Google App Engine, on Ubuntu:
- Make path to our Goole App Engine, change the computer name with yours.
- Make the path permanently
$ unzip google_appengine_1.7.7.zip
$ mv google_appengine ~
Then, in .profile once again input the path in step 3:
Writing the first App
- Make your Google App Engine folder, for example
- Make the sub-folder in apps with the app project name, for example is mine
- Create file app.yaml in folder btatmaja
- Make your first Hello word
$ mkdir google_appengine/apps
$ mkdir google_appengine/apps/btatmaja
- url: /.*
print 'Content-Type: text/plain'
print 'Hello Udacity'
Testing the application
- Start the Google web server app engine with the following command followed by your app name (folder). Please look at your current directory, and add the additional scripts
That will start web server app engine, check it in your web browser by typing: localhost:8080/ . If you got the following your web app in local machine is done, continue it to upload in real Google web server.
|Hello world app in local machine|
- Upload your app to real Google web server (Consider you current directory). Fill your Google account and password.
- It’s done. Check the app in http:btatmaja.appspot.com (replace ‘btatmaja’ with your app name).
appcfg.py update btatmaja/
|Hello world app in Google Appspot|