Documentation / Tutorials / Awesome Enterprise
Creating PWA in Awesome Apps
/ Awesome Enterprise / Creating PWA in Awesome Apps
To add the support for the PWA for awesome app just do following steps:
- Create the awesome js app if not exitsts
- Add the sw-js module in the awesome-js app and paste the following code in it.
- In this code cacheName is the version of the cache.
- Add the manifest file in the app module named as manifest-json and paste the following code in it
- In the ‘init‘ module for core set the ‘Service-Worker-Allowed: /’ header, using
you can also do this change directly on the server either in nginx.conf or .htaccess file.
- In the app scripts add the manifest file by using link tag like this
- In the app scripts module register the service worker by using this code