GAE development using Eclipse. The goal is to create a sample project, deploy to GAE, and check the operation. PC is Macbook Pro MacOS Sierra 64bit
[Reference site] http://westplain.sakuraweb.com/translate/GAE/Python/RuntimeEnvironment.cgi
[Download site] http://mergedoc.osdn.jp/
2.1 Select "File"-> "New"-> "Other"-> "PyDev", select "PyDev Google App Engine Project", and click "Next".
2.2 Enter the project information and click "Next" Project name: Sample
2.3 Enter the following in the Google App Engine Directory
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine
2.4 Done
2.5 Create an empty project 「From Which Template do you want to create your new Google App Project?」 so Select "Empty Project"
2.6 Create a script Create the simplest sample source [helloworld.py] as below directly under the project
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#Comments
#
import webapp2
class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.write('Hello World !')
app = webapp2.WSGIApplication([
('/.*', MainHandler)
], debug=True)
2.7 Creating app.yaml
application: sample-app-12461
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: helloworld.ap
libraries:
- name: webapp2
version: "2.5.2"
2.6 Debug execution (1) Debug execution (2) Check the log
The following log is output to the Eclipse console
(3) Check with a browser
http://localhost:8080
I confirmed that it works locally, so I will deploy it to the actual GAE.
3.1 Upload to GAE
3.2 Check with GAE
Log in to the GCP management console, click "App Engine" → "Version", and it will be deployed as shown below, so click the version