I'm trying to figure out a workflow on how to integrate polymer into a google app engine project written in java.
According to the polymer documentation to build the polymer application, you have to run gulp. This builds and then generates the dist code which can be served on some port. I was wondering that since it generates a dist folder which is static, could I configure a web.xml
in my WEB-INF
folder to serve the dist folder as my front-end and deploy it?
If it's just static files, you don't even need to configure project in java. Plain app.yaml
with list of static files is enough.
Try this 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
And then deploy it as:
gcloud preview app deploy path/to/app.yaml
The benefit that for such empty app you don't even need a server started, static files are served from Google cdn.
Of course you can always deploy a new version of the app, implemented in java (or python, anything), and replace this one.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.