![](/img/trans.png)
[英]How do you query the set of Users in Google App Domain within your Google App Engine project?
[英]How do you configure the app engine to deploy your app with the node_modules folder in the file stucture?
我在Google App Engine上使用grunt,但是每次尝试部署时,都必须将node_modules移出目录才能正常工作。
这是我的文件结构-
project/
lib/
node_modules/
app/
static/
templates/
__init__.py
views.py
models.py
.gitignore
README.md
app.yaml
appengine_config.py
Gruntfile.js
package.json
因此,我在这里查看了有关此主题的其他问题,但它适用于java,并且我使用的是python,因此如何配置应用程序引擎以在文件结构中使用node_modules文件夹部署应用程序? 我已经忽略了所有grunt文件,也没有将它们提交到我的仓库中,所以我不知道这里会有任何帮助。
您可以在应用程序的配置文件中使用skip_files元素 :
skip_files元素指定不将应用程序目录中的哪些文件上传到App Engine。 该值可以是正则表达式,也可以是正则表达式列表。 上载应用程序时,将从要上载的文件列表中省略任何与任何正则表达式匹配的文件名。
请注意覆盖该文档部分中的默认设置。
application: project
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /*.svg
static_files: app/static/images/images_dest/*.svg
upload: app/static/images/images_dest/*.svg
mime_type: image/svg+xml
- url: /static
static_dir: app/static
- url: .*
script: app.app
skip_files:
- ^(node_modules)
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$
libraries:
- name: jinja2
version: "2.6"
- name: markupsafe
version: "0.15"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.