Posted By: Anonymous
I want to deploy a Polymer web app.
Since Polymer seems to manage routing with
<app-route>, can I just install the Polymer CLI on my server and run
polymer serve? Or should I make a backend, and if so, how do I tie it to the Polymer frontend?
No need to install
polymer-cli on your server.
Just follow the steps on https://www.polymer-project.org/1.0/docs/tools/polymer-cli#build.
So you should use
polymer build --entrypoint index.html to build your application for production.
/build/ folder you get two folders:
Quoted from polymer-project.org:
bundled. All fragments are bundled together to reduce the number of
file requests. Optimal for sending to clients or serving from servers
that are not HTTP/2 compatible.
unbundled. Fragments are unbundled.
Optimal for HTTP/2-compatible servers and clients.
Just upload the contents of one of them to your server and your application will be served.