MatthieuLemoine / push-receiver

A library to subscribe to GCM/FCM and receive notifications within a node process.
https://medium.com/@MatthieuLemoine/my-journey-to-bring-web-push-support-to-node-and-electron-ce70eea1c0b0
MIT License
202 stars 79 forks source link

Browser support #48

Open albertfrates opened 3 years ago

albertfrates commented 3 years ago

I created a fork of this repo, however I'm taking a step back to ask the question:

What would it take to get this running in the browser. Currently I noticed it uses the native crypto module in Node. I did find a 1:1 replacement for this in the browser. crypto-browserify.

What else would be needed to make this work in the browser? I'm up for doing the work but wanted to see if you could share any insights you have.

We have a project where we want to have a React App receive notifications.

jimmywarting commented 3 years ago

I know nothing but i presume the push receiver sets up a TCP socket which you do not have in the browser. so i bet it's not possible, use native web push instead?