Skip to content

Commit

Permalink
Update DEVELOPMENT_PATH_WEB.md
Browse files Browse the repository at this point in the history
  • Loading branch information
paulincai authored Jun 2, 2020
1 parent 38ccc6f commit cda7da8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions DEVELOPMENT_PATH_WEB.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

meteor add activitree:push

** If you are looking for a more complex implementation of a Meteor PWA with Notifications, Offline Caching and Offline experience, please visit this repo: https://github.com/activitree/Meteor-PWA-Explained

As of 2.0.6, activitree:push looks for a Firebase configuration (client side) and if one is found, the package calls for an installation of `/firebase-messaging-sw.js` otherwise it will default to `sw.js`. You are expected to have both files in your `/public` folder if you plan to use Web Push notifications. Documentation here: https://github.com/activitree/Meteor-PWA-Explained/blob/master/3_Service_workers.md


* Add your configuration in startup/client: https://github.com/activitree/meteor-push/blob/master/example/app/startup/client/index.js

* Add your configuration in startup/server: https://github.com/activitree/meteor-push/blob/master/example/app/startup/server/index.js . This step requires the existence of a Firebase configuration file.
Expand All @@ -17,8 +22,6 @@ meteor add activitree:push

Copy the worker file here: https://github.com/activitree/meteor-push/blob/master/example/app/public/firebase-messaging-sw.js to your public folder. This needs to be available at https://www.your_address.com/firebase-messaging-sw.js. This worker is responsible for handling backgroud messages. Your 'action' key in the notification object contains the URL that will be open when the notification on screen is being clicked on.

** If you are looking for a more complex implementation of a Meteor PWA with Notifications, Offline Caching and Offline experience, please visit this repo: https://github.com/activitree/Meteor-PWA-Explained


***Note:***
With Firebase, some of the public credentials are exposed and visible on the client. Read this for an understanding of how to restrict public API keys in Firebase: https://medium.com/@impaachu/how-to-secure-your-firebase-project-even-when-your-api-key-is-publicly-available-a462a2a58843

0 comments on commit cda7da8

Please sign in to comment.