我正在尝试找出如何将聚合物集成到用java编写的谷歌应用引擎项目中的工作流程。
根据构建聚合物应用的聚合物文档,您必须运行gulp。这构建然后生成可以在某个端口上提供的dist代码。我想知道因为它生成了一个静态的dist文件夹,我可以在web.xml
文件夹中配置WEB-INF
来将dist文件夹作为我的前端服务并部署吗?
答案 0 :(得分:0)
如果它只是静态文件,您甚至不需要在java中配置项目。带有静态文件列表的普通app.yaml
就足够了。
试试这个app.yaml:
module: default
runtime: python27 # <- doesn't matter for static website, just don't think you can define java here
api_version: '1.0'
threadsafe: true
handlers:
# it's just an example, use your paths
- url: /assets
static_dir: assets
- url: /
static_files: index.html
upload: index.html
然后将其部署为:
gcloud preview app deploy path/to/app.yaml
对于您甚至不需要启动服务器的空白应用程序的好处,静态文件是从Google cdn提供的。
当然,你总是可以部署一个新版本的应用程序,用java(或python,任何东西)实现,并替换它。