url = http://localhost:8000/instances
的app.yaml
application: 222999888
version: 1
runtime: python27
api_version: 1
threadsafe: true
libraries:
- name: webapp2
version: "2.5.2"
- name: webob
version: "1.2.3"
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: /hello
script: main.app
main.py
import webapp2
class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.write('Hello world!')
app = webapp2.WSGIApplication([('/', MainHandler)], debug=True)
现在我不知道如何通过http://localhost:8000/hello
网址访问hello world文本,因为当我尝试访问此网址时,它会显示404。
我在哪里弄错了
我关注此页面https://developers.google.com/appengine/training/intro/gettingstarted
PS: 使用ubuntu + python2.7.6 +命令行界面
编辑:
WARNING 2014-09-01 06:07:35,845 api_server.py:383] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO 2014-09-01 06:07:35,848 api_server.py:171] Starting API server at: http://localhost:58535
INFO 2014-09-01 06:07:35,850 dispatcher.py:183] Starting module "default" running at: http://localhost:8080
INFO 2014-09-01 06:07:35,852 admin_server.py:117] Starting admin server at: http://localhost:8000
INFO 2014-09-01 06:08:10,090 module.py:652] default: "GET / HTTP/1.1" 404 -
答案 0 :(得分:1)
默认情况下,Web服务器侦听端口8080。您可以通过以下网址访问该应用:http://localhost:8080/
。
您正在查看的是开发控制台。
以下是您需要了解的The Python Development Server。