Steps for setting up Google App Engine:
1. Download and Install GoogleAppEngine Launcher
2. Create a directory for our web application with 2 files — .py and app.yaml
.py — the python script that responds to a request, returning something.
import webapp2 class MainPage(webapp2.RequestHandler): Â def get(self): Â Â Â self.response.headers['Content-Type'] = 'text/plain' Â Â Â self.response.write('Hello, webapp2 World!') app = webapp2.WSGIApplication([('/', MainPage)], Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â debug=True)
.yaml configuration file
application: patswebapp <-- this is the same as your unique application identifier in the Google App Engine Website Registration version: 1 runtime: python27 api_version: 1 threadsafe: true handlers: - url: /.* Â script: helloworld.app
3. In GoogleAppEngineLauncher, select File…Add Existing Application…and then select that local directory.
4. Select that application in the application list, select Run, and then Browse to view your web application in the local host: http://localhost:8080/
5. To put your web application online, Deploy –> sign in to your Google App Engine account. The same application identifier (e.g. patswebapp) Â must have been created for this to work.
or deploy with the following command: appcfg.py update .
6. View your app online: http://patswebapp.appspot.com