如何使用 Polymer 的 `polymer serve` polyserve 服务器查看 Polymerfire 演示?

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

I want to view this demo of Polymerfire in my browser.

我希望在我的浏览器中看到演示 运行。相反,我看到一个空白页面和以下控制台错误。

console.log.error.message

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

我使用了以下程序:

  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. 我将项目命名为 my-app
  4. 我使用 CLI 安装了在此处找到的 Github 存储库:
    bower install ---save firebase/polymerfire
  5. 我打开终端并导航到应用程序的根目录。
    cd path/to/my-app
  6. I ran the following Polymer-CLI command (per the instructions found here).
    polymer serve

我该怎么做才能尝试解决这个问题,以便我可以在浏览器中看到演示 运行?

运行 元素演示的最佳方式是检查它...

git clone https://github.com/firebase/polymerfire.git

cd polymerfire

bower install

polymer serve

我从未尝试过 运行 来自 bower 安装文件夹的演示,但是,上述方法可行。

您还必须导航到正确的本地主机路径:
http://localhost:8080/components/polymerfire/demo/

所以完整的过程(从命令行)是:

第一,install the polymer-cli per the instructions found here.

npm install -g bower
npm install -g polymer-cli

然后运行以下。

shell.sh
git clone https://github.com/firebase/polymerfire.git
cd polymerfire
bower install
polymer serve
open http://localhost:8080/components/polymerfire/demo/