首页 文章

模块无法在Development Server上的Google App Engine Python中启动

提问于
浏览
1

Problem: 我正在尝试创建一个简单的应用程序,在开发服务器上使用Google App Engine Python中的模块(开发SDK 1.9.2) . 但我没有看到模块在运行时启动(日志消息指定它们启动的端口) .

使用开发服务器上的Launcher启动应用程序时记录:

2014-04-13 02:40:47 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=11080', '--admin_port=8003', u'C:\\gaurav\\coding\\python\\androidbackend1']"
INFO     2014-04-13 02:40:50,572 devappserver2.py:764] Skipping SDK update check.
INFO     2014-04-13 02:40:50,627 api_server.py:171] Starting API server at: http://localhost:59432
INFO     2014-04-13 02:40:50,631 dispatcher.py:182] Starting module "default" running at: http://localhost:11080
INFO     2014-04-13 02:40:50,634 admin_server.py:117] Starting admin server at: http://localhost:8003
INFO     2014-04-13 02:40:56,062 module.py:627] default: "GET / HTTP/1.1" 200 12

This Modules doc page at GAE for Python没有提及有关开发服务器的任何信息 . 从另一个链接,我发现在开发服务器上,所有模块都是在应用程序执行开始时启动的,它们只是URL的端口号不同

Context: 我使用Google Launcher创建了一个新应用,它会生成默认"main.py"和"app.yaml" . 然后我将"main.py"复制到名为"modulem1.py"的文件中,同时保留"main.py" . 我将"app.yaml"复制到名为"modulem1.yaml"的文件中,同时保留"app.yaml"文件 . 我将以下行添加到"modulem1.yaml":

module: modulem1

我想使用Google Endpoints API在网络应用和Android应用之间进行互动 . 所以我需要使用模块,因此我正在尝试使用模块的小型Web应用程序

我应该遗漏一些明显的东西 . 感谢任何帮助

1 回答

  • 7

    如果您使用的是Google App Engine Launcher,那么您需要提供第二个yaml文件的完整路径 modulem1.yaml

    Configuration

    然后,一旦启动它,您就可以查看日志并看到 modulem1 模块已在 http://localhost:8080 启动, default 模块已在 http://localhost:8081 启动

    enter image description here

相关问题