{"id":16880541,"url":"https://github.com/squaremo/snrub","last_synced_at":"2025-06-27T11:34:28.850Z","repository":{"id":2359687,"uuid":"3323224","full_name":"squaremo/snrub","owner":"squaremo","description":"PuSH subscriber for Node.JS","archived":false,"fork":false,"pushed_at":"2018-08-17T19:50:32.000Z","size":23,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T08:04:21.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/squaremo.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}},"created_at":"2012-02-01T08:44:28.000Z","updated_at":"2022-10-23T14:29:59.000Z","dependencies_parsed_at":"2022-08-20T09:41:05.737Z","dependency_job_id":null,"html_url":"https://github.com/squaremo/snrub","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaremo%2Fsnrub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaremo%2Fsnrub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaremo%2Fsnrub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squaremo%2Fsnrub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squaremo","download_url":"https://codeload.github.com/squaremo/snrub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074969,"owners_count":21043490,"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-10-13T15:59:08.452Z","updated_at":"2025-04-11T11:44:07.660Z","avatar_url":"https://github.com/squaremo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![snrub logo](https://vignette.wikia.nocookie.net/simpsons/images/5/5e/Snrub.jpg/revision/latest?cb=20140416021517)\n\n# PuSH subscriber as Connect middleware\n\nThis module provides a [PuSH\n(pubsubhubbub)](http://pubsubhubbub.appspot.com) subscriber. This is a\nobject with methods for subscribing to, and unsubscribing from, topics\non PuSH hubs.\n\nThe object gives you a middleware you can use with\n[Connect](http://www.senchalabs.org/connect/connect.html) or\n[Express](http://expressjs.com/guide.html); provided you host it\nsomewhere suitably accessible via HTTP, it will then accept HTTP\nupdates from the hubs and emit them as events.\n\n    var subscriber = require('snrub')\n      .createSubscriber({'host': 'example.com:8000'});\n    var app = connect(subscriber.middleware());\n\n    subscriber.subscribe('http://pubsubhubbub.appspot.com', // hub\n                         'http://blog.cloudfoundry.com/feed');\n    subscriber.on('subscribe', function(topic) {\n      console.log(\"Subscribed to \" + topic;)\n    });\n    subscriber.on('update', function(topic, content) {\n      console.log(\"Content from \" + topic);\n      console.log(content);\n    });\n\n    app.listen(8000); // pretending we are on host example.com\n\nA demo is available at http://snrub-demo.cloudfoundry.com/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquaremo%2Fsnrub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquaremo%2Fsnrub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquaremo%2Fsnrub/lists"}