我跑在python,但本地主機下面的hello world代碼:8080亙古不顯示任何信息谷歌應用程序引擎蟒蛇喂localhost上不顯示任何東西世界的應用:8080
我使用的Ubuntu 12.04
本地主機:8080顯示空白頁
helloworld.py
import webapp2
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
self.response.write('Hello, World!')
application = webapp2.WSGIApplication([
('/', MainPage),
], debug=True)
的app.yaml
application: your-app-id
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: helloworld.application
輸出如下
[email protected]:~/google$ dev_appserver.py helloworld/
INFO 2013-10-09 12:22:03,559 sdk_update_checker.py:245] Checking for updates to the SDK.
INFO 2013-10-09 12:22:03,565 __init__.py:94] Connecting through tunnel to: appengine.google.com:443
INFO 2013-10-09 12:22:03,571 sdk_update_checker.py:261] Update check failed: <urlopen error Tunnel connection failed: 407 Proxy Authentication Required>
INFO 2013-10-09 12:22:03,595 api_server.py:138] Starting API server at: http://localhost:44748
INFO 2013-10-09 12:22:03,610 dispatcher.py:168] Starting module "default" running at: http://localhost:8080
INFO 2013-10-09 12:22:03,614 admin_server.py:117] Starting admin server at: http://localhost:8000
的'DEF GET'壓痕似乎是錯的 - 它應該在類中縮進。但這可能是複製代碼的結果。 – cdarke