{"id":20170143,"url":"https://github.com/fabrix-app/spool-pgpubsub","last_synced_at":"2025-03-03T04:15:45.989Z","repository":{"id":44045478,"uuid":"221012213","full_name":"fabrix-app/spool-pgpubsub","owner":"fabrix-app","description":"Spool: PgPubsub","archived":false,"fork":false,"pushed_at":"2023-01-24T00:45:18.000Z","size":894,"stargazers_count":0,"open_issues_count":16,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T09:32:34.499Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/fabrix-app.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-11T15:33:48.000Z","updated_at":"2019-11-11T20:28:12.000Z","dependencies_parsed_at":"2023-01-31T14:00:33.307Z","dependency_job_id":null,"html_url":"https://github.com/fabrix-app/spool-pgpubsub","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/fabrix-app%2Fspool-pgpubsub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-pgpubsub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-pgpubsub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-pgpubsub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabrix-app","download_url":"https://codeload.github.com/fabrix-app/spool-pgpubsub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241605820,"owners_count":19989612,"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-11-14T01:17:25.725Z","updated_at":"2025-03-03T04:15:45.972Z","avatar_url":"https://github.com/fabrix-app.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spool-pgpubsub\n\n[![Gitter][gitter-image]][gitter-url]\n[![NPM version][npm-image]][npm-url]\n[![Build Status][ci-image]][ci-url]\n[![Test Coverage][coverage-image]][coverage-url]\n[![Dependency Status][daviddm-image]][daviddm-url]\n[![Follow @FabrixApp on Twitter][twitter-image]][twitter-url]\n\n\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\n\n:package: PgPubsub Spool [PG Listen](https://github.com/andywer/pg-listen)\n\nUtilizes [PG Listen](https://github.com/andywer/pg-listen) to add a Fabrix Extension\n\n\n## Install\n```sh\n$ npm install --save @fabrix/spool-pgpubsub\n```\n\n## Configure\n\n```js\n// config/main.ts\nimport { PgPubsubSpool } from '@fabrix/spool-pgpubsub'\nexport const main = {\n  spools: [\n    // ... other spools\n    PgPubsubSpool\n  ]\n}\n```\n\n## Configuration\n\n```\n// config/pgpubsub.ts\nexport const pgpubsub = {\n\n}\n```\n\n\n## Usage\n\n```js\nconst sayHello = (payload) =\u003e {\n    // Do something with Payload when an event is published to channel\n    console.log(payload)\n}\n\n// Add a Channel\nthis.app.spools.pgpubsub.subscribe(name, sayHello)\n\n\n// Publish to the Channel\nthis.app.spools.pgpubsub.publish(name, data)\n\n\n// Completely rid the channel\nthis.app.spools.pgpubsub.unsubscribe(name, sayHello)\n```\n\n[npm-image]: https://img.shields.io/npm/v/@fabrix/spool-pgpubsub.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@fabrix/spool-pgpubsub\n[ci-image]: https://img.shields.io/circleci/project/github/fabrix-app/spool-pgpubsub/master.svg\n[ci-url]: https://circleci.com/gh/fabrix-app/spool-pgpubsub/tree/master\n[daviddm-image]: http://img.shields.io/david/fabrix-app/spool-pgpubsub.svg?style=flat-square\n[daviddm-url]: https://david-dm.org/fabrix-app/spool-pgpubsub\n[gitter-image]: http://img.shields.io/badge/+%20GITTER-JOIN%20CHAT%20%E2%86%92-1DCE73.svg?style=flat-square\n[gitter-url]: https://gitter.im/fabrix-app/fabrix\n[twitter-image]: https://img.shields.io/twitter/follow/FabrixApp.svg?style=social\n[twitter-url]: https://twitter.com/FabrixApp\n[coverage-image]: https://img.shields.io/codeclimate/coverage/github/fabrix-app/spool-pgpubsub.svg?style=flat-square\n[coverage-url]: https://codeclimate.com/github/fabrix-app/spool-pgpubsub/coverage\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabrix-app%2Fspool-pgpubsub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabrix-app%2Fspool-pgpubsub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabrix-app%2Fspool-pgpubsub/lists"}