whilelucky / pwa

An opinionated progressive web app boilerplate
MIT License
357 stars 47 forks source link

how is the Server worker working on http request, Can you please elaborate #12

Open deepakchaurasia01 opened 6 years ago

perinikhil commented 6 years ago

Could you please give me more details on on which command you're running to start the server?

nkapoor-jfl commented 6 years ago

@perinikhil npm run development : is the command over which server is getting started

perinikhil commented 6 years ago

'npm run eevelopment' builds and runs the server on 'localhost', and since localhost is considered a secure server by service workers, they execute even though it's on http protocol :)

perinikhil commented 6 years ago

https://www.chromium.org/blink/serviceworker/service-worker-faq

Read the answer to the third question "Q: I get an error message about "Only secure origins are allowed". Why?" which clearly says so 😃