Skip to content

Instantly share code, notes, and snippets.

@colwilson
Created January 29, 2013 13:58
Show Gist options
  • Save colwilson/4664418 to your computer and use it in GitHub Desktop.
Save colwilson/4664418 to your computer and use it in GitHub Desktop.
PROJ=gae_project
mkvirtualenv ${PROJ}
cdvirtualenv
GAE=1.7.4
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