{"id":21995128,"url":"https://github.com/redhataccess/push-server","last_synced_at":"2026-04-16T05:34:21.237Z","repository":{"id":77524514,"uuid":"62839415","full_name":"redhataccess/push-server","owner":"redhataccess","description":null,"archived":false,"fork":false,"pushed_at":"2016-07-15T17:32:48.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-03-23T04:17:18.625Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redhataccess.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-07T21:33:39.000Z","updated_at":"2016-07-07T21:35:18.000Z","dependencies_parsed_at":"2023-09-06T01:37:32.542Z","dependency_job_id":null,"html_url":"https://github.com/redhataccess/push-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/redhataccess/push-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhataccess%2Fpush-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhataccess%2Fpush-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhataccess%2Fpush-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhataccess%2Fpush-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhataccess","download_url":"https://codeload.github.com/redhataccess/push-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhataccess%2Fpush-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31872656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-29T21:12:26.071Z","updated_at":"2026-04-16T05:34:21.221Z","avatar_url":"https://github.com/redhataccess.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Push Server\n\nEnabling push notifications on the web. This server uses [hapi](http://hapijs.com/) for the API, Mongo for the database, and the [web-push](https://github.com/web-push-libs/web-push) Node.js library to send push notifications.\n\n## Install\n```\nnpm install\n```\n\nA postinstall script will run and create a .env file that needs to have a GCM_API_KEY value set. If you don't already have a GCM_API_KEY, follow the directions on [Implementing GCM Client on Chrome](https://developers.google.com/cloud-messaging/chrome/client)\\*.\n\n\\* All of this may need to change soon since [Firebase Cloud Messaging (FCM)](https://firebase.google.com/docs/cloud-messaging/) is replacing GCM.\n\n## Run\n```\nnpm start\n```\nThis will start nodemon and will automatically restart anytime the code is modified and saved.\n\n## Routes\n\n### GET /health\n\nA simple route that will respond with \"Healthy\" if the server is up and running.\n\n### GET /subscription\n\nRetrieves all of the subscriptions.\n\n### POST /subscription\n\nAdds a subscription. Expects an application/json payload with the following structure:\n```\n{\n  \"endpoint\": \"(the endpoint string provided by the browser)\",\n  \"keys\": {\n    \"p256dh\": \"(public key provided by the browser)\",\n    \"auth\": \"(auth key provided by the browser)\"\n  }\n}\n```\n\n### GET /subscription/{subscriptionId}\n\nRetrieves a subscription.\n\n### DELETE /subscription/{subscriptionId}\n\nDeletes a subscription.\n\n### GET /message\n\nRetrieves all of the messages.\n\n### POST /message\n\nAdds a message. Expects an application/json payload with the following structure:\n```\n{\n  \"title\": \"whatever string\",\n  \"body\": \"whatever string\"\n}\n```\n\n### GET /message/{messageId}\n\nRetrieves a message.\n\n### DELETE /message/{messageId}\n\nDeletes a message.\n\n### POST /notify\n\nCurrently this route sends push notifications to all of the subscriptions in the database. This, of course, will need to change.\n\nThe messageId is the ID of the message that you want to send. The database will grab that message and then send it to all of the subscriptions.\n\nExpects an application/json payload with the following structure:\n```\n{\n  \"messageId\": \"whatever message id\"\n}\n```\n\n### POST /track\n\nWork in progress.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhataccess%2Fpush-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhataccess%2Fpush-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhataccess%2Fpush-server/lists"}