Tuesday, December 4, 2012

GoogleAppEngine :: Ubuntu 12.10

Download Google App Engine.
URL: https://developers.google.com/appengine/downloads
Download: google_appengine_1.7.3.zip

Unzip and move it.
$ cd ~/Desktop/
$ unzip google_appengine_1.7.3.zip
google_appengine/*

Check the command
$ ./dev_appserver.py

Create the required files.
$ cd ~/Desktop
$ mkdir helloworld
$ cd helloworld
$ touch helloworld.py app.yaml

$ cat helloworld.py 
print 'Content-Type: text/plain'
print ''
print 'Hello, world!'

$ cat app.yaml 
application: helloworld
version: 1
runtime: python
api_version: 1

handlers:
- uri: /.*
  script: helloworld.py

Run the Application
$ cd ..
$ ~/path/google_appengine/dev_appserver.py helloworld

Visit the browser:
localhost:8080

Its all working good.

To use sqlite instead of MySQL
$ ~/google_appengine/dev_appserver.py --use_sqlite helloworld



No comments:

Post a Comment