问题
I want to view this demo of Polymerfire in my browser.
I expect to see the demo run in my browser. Instead, I see a blank page and the following console error.
console.log.error.messageGET http://localhost:8080/ 404 (Not Found)
Navigated to http://localhost:8080/
I used the following procedure:
- I installed the Polymer-CLI multi-tool per the instructions found here.
- I created a project using the Polymer Starter Kit (PSK).
- I named the project
my-app
. - I installed the Github repo found here using the CLI:
bower install ---save firebase/polymerfire
- I opened the terminal and navigated to the app's root directory.
cd path/to/my-app
- I ran the following Polymer-CLI command (per the instructions found here).
polymer serve
What can I do to try and solve this so I can see the demo run in my browser?
回答1:
The best way to run an elements demo is to check it out...
git clone https://github.com/firebase/polymerfire.git
cd polymerfire
bower install
polymer serve
I have never tried to run the demos from a bower install'd folder but, the above method will work.
回答2:
You also have to navigate to the correct localhost path:http://localhost:8080/components/polymerfire/demo/
So the complete procedure (from the command line) is:
First, install the polymer-cli per the instructions found here.
npm install -g bower
npm install -g polymer-cli
Then run the following.
shell.shgit clone https://github.com/firebase/polymerfire.git
cd polymerfire
bower install
polymer serve
open http://localhost:8080/components/polymerfire/demo/
来源:https://stackoverflow.com/questions/37776739/how-to-view-the-polymerfire-demo-using-polymer-s-polymer-serve-polyserve-serve