Created
May 5, 2012 06:46
-
-
Save colwilson/2600447 to your computer and use it in GitHub Desktop.
Install Google App Engine on Ubuntu 12.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROJ=py27_gae_project | |
mkvirtualenv --python=python2.7 ${PROJ} | |
cdvirtualenv | |
GAE=1.6.5 | |
wget -O /tmp/gae.zip http://googleappengine.googlecode.com/files/google_appengine_${GAE}.zip | |
unzip /tmp/gae.zip | |
GAE_APP_NAME=dummy | |
mkdir -p gae_app/static | |
echo """application: ${GAE_APP_NAME} | |
version: development | |
runtime: python27 | |
api_version: 1 | |
threadsafe: true | |
default_expiration: 7d | |
handlers: | |
- url: /static | |
static_dir: static | |
- url: .* | |
script: wsgi_app.app | |
""" > gae_app/app.yaml | |
echo """import webapp2 | |
class MainPage(webapp2.RequestHandler): | |
def get(self): | |
self.response.headers['Content-Type'] = 'text/plain' | |
self.response.out.write('Please replace me with a decent WSGI App Framework such as Flask') | |
app = webapp2.WSGIApplication([('/', MainPage)], | |
debug=True) | |
""" > gae_app/wsgi_app.py | |
python ./google_appengine/dev_appserver.py gae_app/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment