Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
74 views
in Technique[技术] by (71.8m points)

javascript - Web push notification - Do I need to own a server?

I have achieved a simple push notification using source code from here: [https://itnext.io/an-introduction-to-web-push-notifications-a701783917ce][1]

But I want to do more advance by sending push notification remotely to another computer using Chrome like Facebook and some others do.

Now I am able to register subscription and get the endpoint link like this: {

  "endpoint": "https://fcm.googleapis.com/fcm/send/cThXDSA40Mo:APA91bE7lTJvxlF52GsX6huXPogc7C-nAcCrX6r9WrMSAwWToz7UDexDnLnAJJdoG-FSbQfquR8bjpd5Oc_CZQYTHU12gF_7_YmdK06CV77uXhSB6M-6LkmdjMazU5MQisXgjyUEICEd",
  "keys": {
    "p256dh":
"BGaCEBZSsJoqLU_l1hFWpFRwYMH8dHPkfPrPfyO2Sev_ilBYfFwJ7w4W-ppwKmxdhNTcACbi3sf7f0qerSNmQBI",
    "auth":"FPssMOQPmLmXWmdSTdbKVw=="
  }
}

But I don′t know how to go forward with this. Still wonder if I need to own a server or not ?

question from:https://stackoverflow.com/questions/65875549/web-push-notification-do-i-need-to-own-a-server

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It helps if you have a server, so you can see every step of the process and understand what's happening, but if you strictly want to test your app you could use this companion site to send a notification.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...