如何将GAE与Firebase托管结合使用

时间:2020-07-31 09:17:28

标签: django google-app-engine firebase-hosting

我有一个使用Django创建的GAE项目。我还在Firebase上托管了该项目主页的静态网站。

如果有人访问www.myproj.com,他们应该会看到在Firebase上托管的静态网页。

如果有人访问www.myproj.com/j/64gj37,他们应该会看到django项目传递的响应。

我正在寻找这样的东西:

configuration:
url: /
redirect_to: https://myproj-homepage.firebaseapp.com/

url: /(.+)$
project: myproj-django

dispatch.yamlapp.yaml的配置应该是什么?我目前使用的是简单的app.yaml

# [START django_app]
runtime: python37
default_expiration: "4d 5h"
handlers:
# This configures Google App Engine to serve the files in the app's
# static directory.
- url: /static
  static_dir: static/
# This handler routes all requests not caught above to the main app. 
# It is required when static routes are defined, but can be omitted 
# (along with the entire handlers section) when there are no static 
# files defined.
- url: /.*
  script: auto
# [END django_app]

0 个答案:

没有答案
相关问题