{"id":15591991,"url":"https://github.com/cblgh/hyperdb-examples","last_synced_at":"2025-04-30T10:14:41.127Z","repository":{"id":75283769,"uuid":"131706620","full_name":"cblgh/hyperdb-examples","owner":"cblgh","description":"a small introduction to getting started with hyperdb","archived":false,"fork":false,"pushed_at":"2018-06-28T19:15:51.000Z","size":21,"stargazers_count":53,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-30T10:14:33.932Z","etag":null,"topics":["dat","hyperdb","p2p"],"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/cblgh.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},"funding":{"github":"cblgh","patreon":"cblgh","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-05-01T11:41:59.000Z","updated_at":"2023-09-08T17:39:59.000Z","dependencies_parsed_at":"2023-06-06T00:45:33.845Z","dependency_job_id":null,"html_url":"https://github.com/cblgh/hyperdb-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cblgh%2Fhyperdb-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cblgh%2Fhyperdb-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cblgh%2Fhyperdb-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cblgh%2Fhyperdb-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cblgh","download_url":"https://codeload.github.com/cblgh/hyperdb-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251683357,"owners_count":21626953,"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":["dat","hyperdb","p2p"],"created_at":"2024-10-02T23:52:17.090Z","updated_at":"2025-04-30T10:14:41.097Z","avatar_url":"https://github.com/cblgh.png","language":"JavaScript","readme":"# hyperdb-examples\na small example on how to get up and running with [hyperdb](https://github.com/mafintosh/hyperdb) \n\n#### `npm install \u0026\u0026 node index.js --db db1`\nthen in another terminal window, using the key that is printed under `db key is`, write   \n#### `node index.js --db db2 --key \u003ckey\u003e` \nwhere `\u003ckey\u003e` is the key that was printed above\n\nif you want to disable [auto-authorization](https://github.com/cblgh/hyperdb-examples/blob/master/index.js#L50-L69), add the `--noautoauth` flag to the above\n\n## Commands\nthere's a small cli (see [input.js](https://github.com/cblgh/hyperdb-examples/blob/master/input.js)) for interacting with the hyperdb. use it as follows\n\n#### `.db`   \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;print out the db key\n#### `.local`   \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;print out the local feed's key\n#### `.get \u003ckey\u003e`   \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;print out the information stored at `key`  \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;`.get hello` \n#### `.put \u003ckey\u003e=\u003cvalue\u003e`   \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;store `value` under `key` in the database  \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;`.put hello=world`\n#### `.registered \u003ckey\u003e`   \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;check if `key` is authorized to write to the database\n#### `.auth \u003ckey\u003e`   \n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;authorize `key` to write to the database\n\n## References\n* [mafintosh/hyperdb](https://github.com/mafintosh/hyperdb) dat's distributed scalable database, see the full api\n* [jimpick/dat-shopping-list](https://github.com/jimpick/dat-shopping-list) an interactive web demo using hyperdb by way of [hyperdrive#hyperdb-backend](https://github.com/mafintosh/hyperdrive/tree/hyperdb-backend)\n* [substack/chatmesh](https://github.com/substack/chatmesh/) a cli chat client built on hyperdb\n","funding_links":["https://github.com/sponsors/cblgh","https://patreon.com/cblgh"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcblgh%2Fhyperdb-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcblgh%2Fhyperdb-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcblgh%2Fhyperdb-examples/lists"}