4

I want to view this demo of Polymerfire in my browser如何使用Polymer的`聚合物服务'polyserve服务器查看Polymerfire演示?

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

console.log.error.message

GET http://localhost:8080/ 404(未找到)
导航到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

我能做些什么,试图解决这个问题,所以我可以看到我的浏览器演示运行?

回答

4

运行的元素演示是检查出来的最好方法......

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

cd polymerfire 

bower install 

polymer serve 

我从来没有试图从一个凉亭install'd文件夹中运行演示,但是,上面的方法会奏效。

4

您也可以浏览到本地主机正确路径:
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/