如何编写yaml文件 [英] how to write yaml file

查看:115
本文介绍了如何编写yaml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注册了一个Google App Engine应用程序,我在下面有一些文件:

/index.html



/tabs.css



/tab.js

/temp.py



我应该如何编写app.yaml文件?

解决方案

您应该将静态文件放入一些目录,例如 staticdata
,那么你的app.yaml应该是这样的:

 
应用程序:temp
版本:1
运行时:python
api_version:1

处理程序:
- url:/ staticdata
static_dir:staticdata

- url:/.*
script:temp.py


I registered a Google App Engine app and I have some files below:

/index.html

/tabs.css

/tab.js

/temp.py

How should I write the app.yaml file?

解决方案

you should put your static files into some directory, for example staticdata then your app.yaml would look like:

application: temp
version: 1
runtime: python
api_version: 1

handlers:
- url: /staticdata
  static_dir: staticdata

- url: /.*
  script: temp.py

这篇关于如何编写yaml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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