How to run service worker locally with Angular

前端 未结 4 1305
小蘑菇
小蘑菇 2021-01-12 15:16

I am following angular\'s best practice in order to make PWA. After making production build (ng build --prod --aot), I am also running the service worker from

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-12 15:39

    If you want to use other browsers that don't support TimKVU answer then the solution is to use ngrok (https://ngrok.com)

    It sets up a secure tunnel to whatever server you are using. You run it with:

    ngrok http 4200

    Simply connect to the domain shown on screen.

提交回复
热议问题