Search code examples
javagoogle-app-enginepolymer

Polymer on Google App Engine - Java server


I want to use Polymer with a Java server-side on Google AppEngine but in the Polymer documentation it says to modify the app.yaml file with url redirect like that:

handlers:
- url: /bower_components
  static_dir: build/bundled/bower_components
  secure: always

- url: /images
  static_dir: build/bundled/images
  secure: always

- url: /src
  static_dir: build/bundled/src
  secure: always

- url: /service-worker.js
  static_files: build/bundled/service-worker.js
  upload: build/bundled/service-worker.js
  secure: always

- url: /manifest.json
  static_files: build/bundled/manifest.json
  upload: build/bundled/manifest.json
  secure: always

- url: /.*
  static_files: build/bundled/index.html
  upload: build/bundled/index.html
  secure: always

My problem is: how can i do it without using the app.yaml?

In GAE i can't use app.yaml (in java 7 standard environment).

Thanks for help.


Solution

  • A little late but this might help someone:
    I think you can achieve the same using the <static-files> directive. Instead of mapping in app.yaml you can map each individual folder/file like this. Then you just have to include the files properly in your war file.

    EDIT: As I am looking more into this probably a better way would be using services/modules and a dispatch file. You can look for inspiration in this project where they use Go/Polymer but it is the same problem.