How to view the Polymerfire demo using Polymer’s `polymer serve` polyserve server?

寵の児 提交于 2020-01-03 16:25:11

问题


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.message

GET http://localhost:8080/ 404 (Not Found)
Navigated to http://localhost:8080/

I used the following procedure:

  1. I installed the Polymer-CLI multi-tool per the instructions found here.
  2. I created a project using the Polymer Starter Kit (PSK).
  3. I named the project my-app.
  4. I installed the Github repo found here using the CLI:
    bower install ---save firebase/polymerfire
  5. I opened the terminal and navigated to the app's root directory.
    cd path/to/my-app
  6. 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.sh
git 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!