gauntface/simple-push-demo

Could you share you code from https://simple-push-demo.appspot.com/api/v2/sendpush?

kibal4iw opened this issue · 9 comments

Hello, I found that script send data to url https://simple-push-demo.appspot.com/api/v2/sendpush
Could you share you code from this resource?

@kibal4iw You might find this library helpful (https://github.com/GoogleChrome/web-push-encryption) to build a basic Node server to send encrypted notification payload as this repository only demonstrates the client side code for payload-driven push notifications.

(See: https://developers.google.com/web/updates/2016/03/web-push-encryption?hl=en)i

I'd recommend this node library: https://github.com/web-push-libs/web-push

For our server side languages see: https://github.com/web-push-libs/

The code is here: https://github.com/gauntface/simple-push-demo-backend/tree/next-version

Just an FYI that is just to get around CORs with the push services (i.e. be able to trigger a push message from the page). The v2 API does nothing but take the values from the request and makes a request.

@gauntface Ahh nice. I'm curious though, is web-push-libs/web-push in better shape/more widely supported than GoogleChrome/web-push-encryption which is mentioned in the Google developers page? I mean as of now the build is failing in the official Google repo so I guess that's not a great sign.

Yeah it is in better shape. Basically web-push-libs or was started by
marco-c at Mozilla and me and mat scales who worked on the
web-push-encryption library figured it makes sense to support that org.
I've been helping with the node library.

On Fri, 22 Jul 2016, 08:43 Dominic, notifications@github.com wrote:

@gauntface https://github.com/gauntface Ahh nice. I'm curious though,
is web-push-libs/web-push https://github.com/web-push-libs/web-push in
better shape/more widely supported than GoogleChrome/web-push-encryption
https://github.com/GoogleChrome/web-push-encryption which is mentioned
in the Google developers page? I mean as of now the build is failing in the
official Google repo so I guess that's not a great sign.


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#77 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIh8J2WD7x5w53oou63Qwpe5kxwAZhBks5qYOU9gaJpZM4JSvSU
.

@gauntface
@domfarolino

Thanks a lot for yours answers :)

@kibal4iw Heads up I've been working on a simple app very similar to Matt's simple-push-demo to try and learn more about the push api etc. You can find it here domfarolino/push-notifications

@domfarolino i try to use your code. thanks

@domfarolino i've got one question.

there are uri in your script: https://push-notifications-sw.herokuapp.com/pushAll?text=Hey&icon=
can i use my own server or only herokuapp.com?

The readme should tell you you can use the local server if you want. Then
you can deploy a modified version of that server on your own heroku app
instance and change https://push-notif..... To your own deployed instance.
Email me if you have any more Qs so we don't blow up this issue thread
sorry Matt lol.

On Tuesday, July 26, 2016, Александр notifications@github.com wrote:

@domfarolino https://github.com/domfarolino i've got one question.

there are uri in your script:
https://push-notifications-sw.herokuapp.com/pushAll?text=Hey&icon=
can i use my own server or only herokuapp.com?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#77 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJOKqRFnupycUrf2Le1ooYFI1OGXbKyyks5qZlzIgaJpZM4JSvSU
.