title: Using ServiceWorkers in AngularJS
body: <p>This answer <a href="https://stackoverflow.com/questions/30269573/register-service-worker-in-angular-js-application">Register service worker in angular.js application</a> had some helpful points, but I'm still running into issues.</p>
  
  <p>The strange thing is that I know service workers work on my setup because I've gone through the wittr demo <a href="https://github.com/jakearchibald/wittr" rel="nofollow noreferrer">https://github.com/jakearchibald/wittr</a> and had some exposure to service workers already.</p>
  
  <p>Now I'm trying to get service workers setup in my <strong>angularJS</strong> app <a href="https://github.com/ianemcallister/Public_Transportation_App" rel="nofollow noreferrer">https://github.com/ianemcallister/Public_Transportation_App</a>.  I'm getting the following error in my canary devtools console: </p>
  
  <pre><code>GET http://localhost:9000/sw.js net::ERR_INSECURE_RESPONSE
  
  ServiceWorker registration failed:  DOMException: Failed to register a ServiceWorker: The script has an unsupported MIME type ('text/html')
  </code></pre>
  
  <p>I'm pretty much copying and pasting from the example file.  Does it have to do with the build process or something about how the files are being served up locally (both are running on local host)?</p>
  
  <p>I scaffolded my angular app with <a href="https://github.com/angular-fullstack/generator-angular-fullstack" rel="nofollow noreferrer">https://github.com/angular-fullstack/generator-angular-fullstack</a> and the example app has nothing to do with angular, that's the only thing I can think of.</p>
  
  <p>If anyone can point me in the right direction I'd greatly appreciate it!</p>