{"id":20109765,"url":"https://github.com/hyper63/connect","last_synced_at":"2025-07-05T15:02:40.324Z","repository":{"id":52438899,"uuid":"360903754","full_name":"hyper63/connect","owner":"hyper63","description":"@hyper.io/connect is a config module for hyper, making it easy to create hyper urls and tokens with a single connection string","archived":false,"fork":false,"pushed_at":"2021-05-01T11:36:52.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T17:22:06.170Z","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/hyper63.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":"2021-04-23T14:03:25.000Z","updated_at":"2021-05-01T11:36:11.000Z","dependencies_parsed_at":"2022-09-04T19:23:46.498Z","dependency_job_id":null,"html_url":"https://github.com/hyper63/connect","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fconnect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fconnect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fconnect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyper63%2Fconnect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyper63","download_url":"https://codeload.github.com/hyper63/connect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241550008,"owners_count":19980639,"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-13T18:09:23.041Z","updated_at":"2025-03-02T18:24:40.257Z","avatar_url":"https://github.com/hyper63.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003e@hyper.io/connect\u003c/h1\u003e\n\u003cp align=\"center\"\u003e@hyper.io/connect is a configuration module for hyper clients, this module gives the developer two functions: `url` and `token`, which can take a `hyperio` connection string and create the proper url for a given service and the secure token to access that service.\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/hyper63/connect/workflows/.github/workflows/test.yml/badge.svg\" /\u003e\u003c/p\u003e\n\n---\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n- [Installation](#installation)\n- [Features](#features)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Getting Started\n\nInstall the `@hyper.io/connect` module\n\n`npm install @hyper.io/connect`\n\nCreate an environment variable called `HYPER`\n\n```sh\nexport HYPER=hyperio://u:p@test.hyper.io/svc\n```\n\nUse the `@hyper.io/connect` module in your Data Access Layer (DAL)\n\n```js\nimport hyper from '@hyper.io/connect'\n\nasync function query(selector) {\n  await fetch(hyper.url('data') + '/_query', {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json',\n      Authorization: `Bearer ${hyper.token()}`\n    },\n    body: JSON.stringify({\n      selector\n    })\n  })\n  .then(r =\u003e r.json())\n}\n\nquery({ type: 'widget'}).then(console.log.bind(console))\n```\n\n## Installation\n\n`npm install @hyper.io/connect`\n\nor\n\n`yarn add @hyper.io/connect`\n\n## Features\n\n* url (service : string, ...paths : string) : string\n\nThis method takes a hyper service port as an argument\nand optional path argurments and returns a full url \nto access the service for an app.\n\nCurrently, hyper supports the following service ports:\n\n* data\n* cache\n* search\n* storage\n* queue\n\n\n``` js\nimport hyper from '@hyper.io/connect'\n\nconsole.log(hyper.url('search', '_search'))\n```\n\n* token ( payload: object ) : string\n\nThis method takes no arguments and returns a token based on the \nhyper connection string that should give the client secure access\nto the hyper service.\n\n\n\n## Contributing\n\nAll contributions welcome.\n\n## License\n\nApache 2.0\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyper63%2Fconnect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyper63%2Fconnect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyper63%2Fconnect/lists"}