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/