{"id":20885740,"url":"https://github.com/gabel/keyv-nats","last_synced_at":"2025-05-12T19:31:24.582Z","repository":{"id":172159823,"uuid":"647621843","full_name":"gabel/keyv-nats","owner":"gabel","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-30T15:16:14.000Z","size":178,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-09T07:29:22.470Z","etag":null,"topics":["cachios","keyv","nats","typescript"],"latest_commit_sha":null,"homepage":"","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/gabel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-05-31T07:12:23.000Z","updated_at":"2023-12-20T11:59:16.000Z","dependencies_parsed_at":"2024-01-30T16:04:49.829Z","dependency_job_id":"4348aa24-bc34-43ae-9a39-8cbbb59854c8","html_url":"https://github.com/gabel/keyv-nats","commit_stats":{"total_commits":10,"total_committers":3,"mean_commits":"3.3333333333333335","dds":"0.30000000000000004","last_synced_commit":"d7b75dea91a28195f3307337beb9bd6326e6c28a"},"previous_names":["gabel/keyv-nats"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabel%2Fkeyv-nats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabel%2Fkeyv-nats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabel%2Fkeyv-nats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabel%2Fkeyv-nats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabel","download_url":"https://codeload.github.com/gabel/keyv-nats/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225148839,"owners_count":17428430,"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":["cachios","keyv","nats","typescript"],"created_at":"2024-11-18T08:14:20.872Z","updated_at":"2024-11-18T08:14:21.688Z","avatar_url":"https://github.com/gabel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keyv-nats\n\n\u003e NATS storage adapter for the awesome [keyv](https://github.com/jaredwray/keyv).\n\n[![build](https://github.com/gabel/keyv-nats/actions/workflows/tests.yaml/badge.svg)](https://github.com/gabel/keyv-nats/actions/workflows/tests.yaml)\n[![codecov](https://codecov.io/github/gabel/keyv-nats/branch/main/graph/badge.svg?token=0Z1LP396MP)](https://codecov.io/github/gabel/keyv-nats)\n[![GitHub license](https://img.shields.io/github/license/gabel/keyv-nats)](https://github.com/gabel/keyv-nats/blob/master/LICENSE)\n[![npm](https://img.shields.io/npm/dm/keyv-nats)](https://npmjs.com/package/keyv-nats)\n\n## Installation\n\n```shell\nyarn add keyv keyv-nats\n```\n\n## Usage\n\n```typescript\nimport Keyv from 'keyv'\nimport KeyvNats from 'keyv-nats'\n\nconst keyvNats = new KeyvNats({ servers: \"localhost:4222\" });\nawait keyvNats.connect();\nconst keyv = new Keyv({ store: keyvNats })\n\nconst key = 'foo'\nconst value = 'bar'\n\nawait keyv.set(key, value)\n\nawait keyv.get(key)\n\nkeyvNats.disconnect();\n```\n\n## Tests\n\nNATS Keyv storage adapter uses [Testcontainers for NodeJS](https://node.testcontainers.org/) in order to run \nNATS server during test automation. Please check [general Docker requirements](https://www.testcontainers.org/supported_docker_environment/) \nof Testcontainers to run those in your local docker environment.\n\n```shell\n# nothing else required as testcontainer will start and stop nats\nyarn test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabel%2Fkeyv-nats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabel%2Fkeyv-nats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabel%2Fkeyv-nats/lists"}