su-fit-vut / kachna-online

Students' Club U Kachničky: Member's portal
MIT License
5 stars 5 forks source link

Implement push notifications #57

Closed FrNecas closed 2 years ago

FrNecas commented 2 years ago

You won't be able to test this locally by using ng serve. You need to compile using ng build and then use a separate HTTP server (e.g. http-server from npm). Also by default, service workers are enabled only on prod environment so if you really want to test this, there is some tweaking to do. However since prod uses a separate HTTP server, I assume that the following should be sufficient to make this run on prod: 1) migrate DB 2) generate VAPID keys using web-push generate vapid-keys --json, add then to config + also add subject (which should be site URL or mailto, as noted in the documentation comment). 3) build + run it 4) hopefully profit