This answer Register service worker in angular.js application had some helpful points, but I'm still running into issues.
The strange thing is that I know service workers work on my setup because I've gone through the wittr demo https://github.com/jakearchibald/wittr and had some exposure to service workers already.
Now I'm trying to get service workers setup in my angularJS app https://github.com/ianemcallister/Public_Transportation_App. I'm getting the following error in my canary devtools console:
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')
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)?
I scaffolded my angular app with https://github.com/angular-fullstack/generator-angular-fullstack and the example app has nothing to do with angular, that's the only thing I can think of.
If anyone can point me in the right direction I'd greatly appreciate it!