This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
- Send a get request to http://localhost:4000/send-notification
- Put your service worker file in the public folder
- Use 'scope' when registering service worker.
- For push notification, you need VAPID keys
To create VAPID keys, use the following process.
The above command will give you the output as below (use this to register service worker)
=======================================
Public Key: BLHxWiNVmr7ROB8O3KpPRJFAMhMypwe4X9TdWMmhsPSzHszo32PDkndpvWx3H0OY2HwFCQRU98JBpZ_AEsVxWG4
Private Key: VXcSZD3mdKyXEmDZNrB02WTxgUZmdIpAEo5tnXR4OH4
=======================================
Refer: sw-push.js (in the public folder) and server/index.js for registration.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.