将jQuery Mobile应用程序部署到Google App Engine

时间:2014-06-06 00:35:21

标签: jquery python google-app-engine jquery-mobile

我使用PyCharm创建了一个应用程序,项目目录由以下内容组成:

My Project
 ______main.py
 ______app.yaml
 ______templates
 ______html
          _____js
                __________profilePage.js
                __________other .js files
          _____images
          _____css
          _____index.html
          _____profilePage.html

app.yaml:

application: my app id
version: 1
runtime: python27
api_version: 1
threadsafe: yes

handlers:
- url: /favicon\.ico
  static_files: favicon.ico
  upload: favicon\.ico

- url: /js/(.*\.js)
  mime_type: application/javascript
  static_files: js/\1
  upload: js/(.*\.js)

- url: /images
  static_dir: images

- url: .*
  script: main.app

- url: /css
  static_dir: css

- url: /html
  static_dir: html

libraries:
- name: webapp2
 version: "2.5.2"

我尝试使用Google App Engine Launcher将应用程序部署到Google应用引擎,并且已成功部署,但它重定向到main.py中的MainHandler,我自定义设计为打印“hello world”。如何我让我的应用程序显示index.html的内容而不是?

1 个答案:

答案 0 :(得分:0)

你的问题是

- url: .*
  script: main.app

抓住所有到达它的东西。

将其移到列表中。

app.yaml处理程序处理正常。第一场比赛得到了请求。