以下粘贴的app.yaml会出错:
sre_constants.error:无法引用开放组
application: villagegamedev
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /(.*)
static_files: ./\1
upload: ./\1
我对此测试的明确目的是提供源文件夹。当我谷歌这项工作时,搜索只会提供所有文档,说明" App Engine不会直接从您的应用程序的源目录中提供文件,除非配置为这样做。"那么如何配置它呢?
答案 0 :(得分:0)
handlers:
- url: /
static_dir: static
然后将您要提供的所有文件放在名为static
的目录中。
答案 1 :(得分:0)
此link提供完整说明。
基本上你应该做的是;
在您的计算机上创建一个与其名称相同的目录 上面创建的项目。在此处创建您的app.yaml文件。
将此代码粘贴到app.yaml文件
中runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /
static_files: www/index.html
upload: www/index.html
- url: /(.*)
static_files: www/\1
upload: www/(.*)
在您的计算机上启动google cloud sdk并运行以下命令
gcloud app deploy
7.run gcloud app browse
在您的浏览器中查看您的网站。
希望有所帮助!