Skip to content

Instantly share code, notes, and snippets.

@daker
Created June 7, 2012 21:54
Show Gist options
  • Select an option

  • Save daker/2891806 to your computer and use it in GitHub Desktop.

Select an option

Save daker/2891806 to your computer and use it in GitHub Desktop.
Install Google App Engine SDK on Ubuntu 12.04
# Copyright (C) 2012 Adnane Belmadiaf <daker@ubuntu.com>.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
sudo apt-get install unzip
printf "Downloading GAE v1.6.6"
wget -O gae.zip http://googleappengine.googlecode.com/files/google_appengine_1.6.6.zip
printf "unzipping the archive"
unzip gae.zip
mkdir -p gmarocapp/static
echo """application: gmarocapp
version: development
runtime: python27
api_version: 1
threadsafe: true
default_expiration: 7d
handlers:
- url: /static
static_dir: static
- url: .*
script: wsgi_app.app
""" > gmarocapp/app.yaml
echo """import webapp2
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/html'
self.response.out.write('Gmaroc 2012, happy coding :) <br /><img src="https://i.minus.com/iLMNG1IjfBrM5.jpg" />')
app = webapp2.WSGIApplication([('/', MainPage)],
debug=True)
""" > gmarocapp/wsgi_app.py
python ./google_appengine/dev_appserver.py gmarocapp/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment