Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Push notification with nodejs

Push notification with nodejs


I am working on a new project in which we have tiny social networking feature, where each user has an ability to post/share quotes, and more over facility of like and comment.

so, i want to build a (user specific )realtime Push Notification module with nodejs.

Problem courtesy of: KrunalG


You can use socket to do so. What you can do is create a Userlist array on server who are online in the system. The userList will contain user information along with the socket id.

When a particular event occurs you know to whom to send that Notification, and then check if all those users are available in the userList. If a user is available in the userList, use socket to emit the notification to that users.

Solution courtesy of: Jeet


View additional discussion.

This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Push notification with nodejs


Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription