{"id":22615713,"url":"https://github.com/respoke/sample-push-server","last_synced_at":"2025-08-09T04:27:15.251Z","repository":{"id":32335900,"uuid":"35911310","full_name":"respoke/sample-push-server","owner":"respoke","description":"A sample server for receiving webhook events from Respoke and responding to push notification events","archived":false,"fork":false,"pushed_at":"2015-07-15T21:07:46.000Z","size":180,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-03T10:46:24.255Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/respoke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-19T22:10:56.000Z","updated_at":"2015-07-13T17:29:07.000Z","dependencies_parsed_at":"2022-08-20T09:40:28.552Z","dependency_job_id":null,"html_url":"https://github.com/respoke/sample-push-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/respoke%2Fsample-push-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/respoke%2Fsample-push-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/respoke%2Fsample-push-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/respoke%2Fsample-push-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/respoke","download_url":"https://codeload.github.com/respoke/sample-push-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246122247,"owners_count":20726822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-08T19:09:10.058Z","updated_at":"2025-03-29T00:42:49.983Z","avatar_url":"https://github.com/respoke.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#Respoke sample push server\n\n[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/respoke/sample-push-server)\n\n## Overview\nRespoke push notifications are awesome, because you can get up and running easily without needing any backend components!\nThe static configuration available through the [Respoke Developer Console][] is usually enough to get you going with\nstandard push support for 1:1 message, group message, and call notifications.\n\nHowever, some applications have push notification needs that are not a good fit for static configuration alone. For\nexample, if an application wants to conditionally send push notifications based on a checkbox in the application's ui,\nthen the application would need to control whether or not the push notification is dispatched.\n\nIt is for situations like these that Respoke provides the ability to enable \"push events\" via webhook and websocket.\n\"Push events\" allow you to  \"take over\" the process of dispatching push notifications. Instead of Respoke automatically\ndispatching the push notification to the registered mobile device, the application server can apply business logic to\nthe push event to decide whether the notification should be sent. If the application does decide to sent the\nnotification, it can customize many of the properties of the notification such as\n\n - the text of the message that is pushed\n - whether the 'badge' is enabled\n - the badge 'count'\n - the 'category' of the notification\n - the sound file to play when the notification is received\n\n## This App\nThis application is an example of building a server that responds to push notification events broadcast via Respoke\nwebhook. This specific example demonstrates how you might dispatch push notifications to a push-enabled endpoint,\nmodifying the text of the push message prior to sending.\n\n## Setup\n 1. deploy this application somewhere, specifying the APP_SECRET environment variable using the value provided\n in the [Respoke Developer Console][]\n 2. configure your application to post webhook events to the url where the application is deployed\n 3. enable push events for \"1:1 message\" notifications\n 4. connect a mobile client to the application, have it register for push notifications, then disconnect it\n 5. send the mobile client's endpointId a **direct** message\n\nIf all goes well, you should see a push notification with a '🎯' prepended to it!\n\n## License\n[MIT](LICENSE)\n\n[Respoke Developer Console]: https://portal.respoke.io\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frespoke%2Fsample-push-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frespoke%2Fsample-push-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frespoke%2Fsample-push-server/lists"}