{"id":18699679,"url":"https://github.com/flowhub/flowhub-registry","last_synced_at":"2025-04-12T08:18:07.714Z","repository":{"id":14210565,"uuid":"16917297","full_name":"flowhub/flowhub-registry","owner":"flowhub","description":"Library for dealing with the Flowhub Runtime Registry","archived":false,"fork":false,"pushed_at":"2023-02-27T19:57:58.000Z","size":126,"stargazers_count":14,"open_issues_count":9,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-12T08:18:02.074Z","etag":null,"topics":["fbp","flowhub"],"latest_commit_sha":null,"homepage":"http://flowhub.io","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/flowhub.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":"2014-02-17T15:35:13.000Z","updated_at":"2022-11-16T15:21:04.000Z","dependencies_parsed_at":"2024-06-19T01:36:49.214Z","dependency_job_id":null,"html_url":"https://github.com/flowhub/flowhub-registry","commit_stats":{"total_commits":99,"total_committers":7,"mean_commits":"14.142857142857142","dds":0.5454545454545454,"last_synced_commit":"bbbd39949c0f279ff7bbc1b9852790fa9c8cbb34"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowhub%2Fflowhub-registry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowhub%2Fflowhub-registry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowhub%2Fflowhub-registry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowhub%2Fflowhub-registry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flowhub","download_url":"https://codeload.github.com/flowhub/flowhub-registry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537192,"owners_count":21120711,"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":["fbp","flowhub"],"created_at":"2024-11-07T11:34:05.033Z","updated_at":"2025-04-12T08:18:07.696Z","avatar_url":"https://github.com/flowhub.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Flowhub Runtime Registry library\n================================\n\nThis library provides easy access to the [Flowhub](http://flowhub.io) runtime registry. It is intended to be used by [Flow-Based Programming Protocol](http://noflojs.org/documentation/protocol/) compatible clients to register themselves available for Flowhub users.\n\nUsage:\n\n```javascript\nconst flowhub = require('flowhub-registry');\n\n// Prepare runtime information\nconst rt = new flowhub.Runtime({\n  // Human-readable label for the runtime\n  label: 'My home NoFlo system',\n  // Unique identifier of the runtime instance (must be valid UUID)\n  id: '754c5dc0-97e9-11e3-a5e2-0800200c9a66',\n  // Flowhub user that should have access to the runtime (must be valid UUID)\n  user: '89454800-97e9-11e3-a5e2-0800200c9a66',\n  // Protocol to be used, eg. websocket, iframe, or webrtc\n  protocol: 'websocket',\n  // URL to the runtime\n  address: 'ws://some.server.address:3569',\n  // Type of the runtime, eg. noflo-nodejs or microflo\n  type: 'noflo-nodejs',\n  // Secret string for the user to utilize for communication (optional)\n  secret: 'C6sxubeP22u4'\n});\n\n// Register the Runtime with Flowhub\nrt.register(function (err, ok) {\n  if (err) {\n    alert('Registration failed');\n  }\n});\n```\n\nIn addition to registering the runtime, it is a good idea to periodically ping Flowhub to let the user know that the runtime is still available.\n\n```javascript\nsetInterval(function () {\n  rt.ping();\n}, 5 * 60 * 1000);\n```\n\nIf you have access to the user's OAuth token you can also remove a registered runtime:\n\n```javascript\nrt.del('nch9138ohf2892fhgf92g8f942fh2938gf3', function (err, ok) {\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowhub%2Fflowhub-registry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowhub%2Fflowhub-registry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowhub%2Fflowhub-registry/lists"}