{"id":20170193,"url":"https://github.com/fabrix-app/spool-realtime","last_synced_at":"2025-06-20T14:12:06.369Z","repository":{"id":33115849,"uuid":"140226866","full_name":"fabrix-app/spool-realtime","owner":"fabrix-app","description":"Spool: Realtime using Primus","archived":false,"fork":false,"pushed_at":"2023-01-23T22:44:33.000Z","size":2665,"stargazers_count":2,"open_issues_count":25,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-27T00:33:56.705Z","etag":null,"topics":["fabrix","primus","spool","spools","typescript","websocket"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","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":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-09T03:31:19.000Z","updated_at":"2019-10-21T23:58:38.000Z","dependencies_parsed_at":"2023-02-13T04:15:22.319Z","dependency_job_id":null,"html_url":"https://github.com/fabrix-app/spool-realtime","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/fabrix-app/spool-realtime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-realtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-realtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-realtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-realtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabrix-app","download_url":"https://codeload.github.com/fabrix-app/spool-realtime/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-realtime/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260959194,"owners_count":23088822,"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":["fabrix","primus","spool","spools","typescript","websocket"],"created_at":"2024-11-14T01:17:38.698Z","updated_at":"2025-06-20T14:12:01.074Z","avatar_url":"https://github.com/fabrix-app.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spool-realtime\n:package: Realtime Spool. Synchronize the client and server via WebSockets using Primus\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[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\n## Getting Started\n\n### Install\n\n```sh\nnpm install --save @fabrix/spool-realtime\n```\n\n### Configure \n\nThen edit `config/main.ts `\n\n```js\nexport const main = {\n  spools: [\n    require('@fabrix/spool-router').RouterSpool,\n    require('@fabrix/spool-express').ExpressSpool, // Or use a different Webserver Spool such as Hapi, Polka, Koa\n    require('@fabrix/spool-realtime').RealtimeSpool\n  ]\n}\n```\n\n### Configure\n\nCreate the config file: `config/realtime.ts `\n\n```js\nexport const realtime = {\n  prefix: null, // The prefix to use for the primus endpoint\n  primus:{\n    options:{\n      //these options are passed directly to the Primus constructor: https://github.com/primus/primus#getting-started\n    }\n  },\n  plugins: {\n    // Plugins are a key and a library passed to primus.use\n    redis: require('primus-redis-rooms')\n  }\n}\n```\n\n## Client\nYou can set the config path for the generated primus.js file by either setting\n\n`config.main.paths.www` (common defaults for webserver spools) or through `config.realtime.path` which should likely be to a static directory.\n\nYou can include the primus client library as a script:\n```\n\u003cscript src=\"/\u003crealtime.path\u003e/primus.js\"\u003e\u003c/script\u003e\n```\n\n## License\n[MIT](https://github.com/fabrix-app/spool-realtime/blob/master/LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/@fabrix/spool-realtime.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@fabrix/spool-realtime\n[ci-image]: https://img.shields.io/circleci/project/github/fabrix-app/spool-realtime/master.svg\n[ci-url]: https://circleci.com/gh/fabrix-app/spool-realtime/tree/master\n[daviddm-image]: http://img.shields.io/david/fabrix-app/spool-realtime.svg?style=flat-square\n[daviddm-url]: https://david-dm.org/fabrix-app/spool-realtime\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/Lobby\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-realtime.svg?style=flat-square\n[coverage-url]: https://codeclimate.com/github/fabrix-app/spool-realtime/coverage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabrix-app%2Fspool-realtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabrix-app%2Fspool-realtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabrix-app%2Fspool-realtime/lists"}