0

I'm brand new to Polymer and have just begun messing around with it the other days. I've put together some basic site with Polymer elements but I haven't been able to find a way to properly test the site before publishing. I'm only using HTML, CSS, JavaScript, and Polymer components with Bower. When I open my HTML file in browser (file://), the Polymer elements are unrendered. The only way I've found to effectively test it was actually publishing the files, which is clearly not the best idea. I've looked into a testing server but I've only seen ones that are using PHP, MySQL, etc and couldn't set up one that works for my case. I've searched around the internet for a while and couldn't find anything that worked for me. Thank you for any help.

Jake Moritz
  • 723
  • 1
  • 7
  • 18

2 Answers2

1

The HTML Imports polyfill uses XHR to load your components. For this reason, you need to run your app on a local server to test. You can do this in many ways: setup Apache, run a node server, or python -m SimpleHTTPServer (if you have python installed)

robdodson
  • 6,264
  • 5
  • 25
  • 34
1

http-server could be the best start. Also have a look on this Angularjs Tutorial. Awesome for newbies for client side apps.

Palak Bhansali
  • 721
  • 4
  • 10