Appengine模块:dispatch.yaml在dev服务器上处于非活动状态 [英] Appengine Modules: dispatch.yaml inactive on dev server

查看:106
本文介绍了Appengine模块:dispatch.yaml在dev服务器上处于非活动状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试哟测试新的模块功能,但不幸的是,它们似乎无法在我的开发环境(osx + python)中加载。

我请参阅此文档 https://developers.google.com/appengine/docs/ python / modules / routing#Python_Routing_in_the_development_server

由于我无法加载我的模块,我发现这个测试应用程序: https://github.com/GoogleCloudPlatform/appengine-modules-helloworld-python ,但不幸的是我遇到了相同的问题。

dispatch.yaml文件使用相对路线。



以下是日志:

>


  • INFO 2013-08-30 00:14:20,702 sdk_update_checker.py:245]检查SDK的更新。

  • INFO 2013-08-30 00:14:2 1,067 sdk_update_checker.py:273] SDK是最新的。

  • INFO 2013-08-30 00:14:21,252 api_server.py:138]在以下位置启动API服务器:localhost:58478

  • INFO 2013-08-30 00:14:21,255 dispatcher.py:164]启动模块default运行于:localhost:8080
  • INFO 2013-08-30 00:14:21,259 admin_server.py:117]启动admin服务器:localhost:8000

  • INFO 2013-08-30 00:14:58,871 module.py :593] default:GET / HTTP / 1.1200 36

  • INFO 2013-08-30 00:15:12,914 module.py:593] default:GET / mobile / HTTP /1.1404 154



如果/ works,我得到了404 / for mobile和/ work。
基于文档,我们还应该看到2个模块mobile-frontend和static-backend开始。



让我知道你是否有想法。 p>

谢谢,

Oliv

解决方案您有没有在启动SDK时指定dispatch.yaml?



dev_appserver.py dispatch.yaml app.yaml my_module_a.yaml my_module_b.yaml



您会看到它们在不同的端口上启动实例,就像后端一样。您应该在控制台中看到,

 启动调度程序,运行位于:http:// localhost:8080 

(或您指定的任何端口)

这可以在这个页面的底部,尽管不明显,你如何让dev_appserver运行dispatch.yaml



更新正如Zachary在评论你不需要再提及dispatch.yaml了。只需为每个模块指定单独的.yaml文件就足够了。确保每个yaml的路径与正在运行dev_appserver.py的目录相关。



更新文档是此处


I'm trying yo test the new "modules" feature but unfortunately they don't seem to load in my dev environment (osx + python).

I followed this doc https://developers.google.com/appengine/docs/python/modules/routing#Python_Routing_in_the_development_server

Since i couldn't get my modules to load, I found this test app: https://github.com/GoogleCloudPlatform/appengine-modules-helloworld-python but unfortunately I'm experiencing the same problem.

The dispatch.yaml files uses relative routes.

Here are the logs:

  • INFO 2013-08-30 00:14:20,702 sdk_update_checker.py:245] Checking for updates to the SDK.
  • INFO 2013-08-30 00:14:21,067 sdk_update_checker.py:273] The SDK is up to date.
  • INFO 2013-08-30 00:14:21,252 api_server.py:138] Starting API server at: localhost:58478
  • INFO 2013-08-30 00:14:21,255 dispatcher.py:164] Starting module "default" running at: localhost:8080
  • INFO 2013-08-30 00:14:21,259 admin_server.py:117] Starting admin server at: localhost:8000
  • INFO 2013-08-30 00:14:58,871 module.py:593] default: "GET / HTTP/1.1" 200 36
  • INFO 2013-08-30 00:15:12,914 module.py:593] default: "GET /mobile/ HTTP/1.1" 404 154

if / works, I get a 404 for /mobile and /work. Based on the doc we should also see the 2 modules mobile-frontend and static-backend started.

Let me know if you have an idea.

Thanks,

Oliv

解决方案

Have you specified the dispatch.yaml when you start the SDK?

dev_appserver.py dispatch.yaml app.yaml my_module_a.yaml my_module_b.yaml

You will see them start an instance on different ports, just like a backend. You should see in the console,

Starting dispatcher running at: http://localhost:8080 

(or whatever port you specified)

This can be found at the bottom of this page, although isn't obvious how you get dev_appserver to run with a dispatch.yaml

UPDATE As Zachary points out in the comments you don't need to mention dispatch.yaml any longer. Just specifying separate .yaml files for each module is enough. Make sure that if the paths to each yaml is correct in relation to the directory you are running dev_appserver.py in.

Update docs are here

这篇关于Appengine模块:dispatch.yaml在dev服务器上处于非活动状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆