{"id":20310221,"url":"https://github.com/bloq/memproxyjs","last_synced_at":"2025-09-08T00:36:08.951Z","repository":{"id":45637273,"uuid":"237464742","full_name":"bloq/memproxyjs","owner":"bloq","description":"microservice wrapper for memcached","archived":false,"fork":false,"pushed_at":"2021-12-03T13:08:54.000Z","size":298,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-02T02:51:40.257Z","etag":null,"topics":["http","memcached","memcached-client","microservice","rest-api"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/bloq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2020-01-31T16:02:08.000Z","updated_at":"2021-12-03T12:21:22.000Z","dependencies_parsed_at":"2022-07-21T06:02:38.257Z","dependency_job_id":null,"html_url":"https://github.com/bloq/memproxyjs","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bloq/memproxyjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloq%2Fmemproxyjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloq%2Fmemproxyjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloq%2Fmemproxyjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloq%2Fmemproxyjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bloq","download_url":"https://codeload.github.com/bloq/memproxyjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloq%2Fmemproxyjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274117363,"owners_count":25225101,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["http","memcached","memcached-client","microservice","rest-api"],"created_at":"2024-11-14T17:30:35.508Z","updated_at":"2025-09-08T00:36:08.927Z","avatar_url":"https://github.com/bloq.png","language":"JavaScript","readme":"# memproxyjs\n\nmicroservice wrapper for memcached\n\n## Installation\n\n```sh\nnpm i\n```\n\n## API Summary\n\n### **Get Item**: GET /cache/item\n\nInput headers:\n`X-MC-Key` should be set to the Base64-encoded key.\n\nOutput payload:\napplication/octet-stream containing cache entry.\n\nHTTP status codes:\n\n- 200, upon success\n- 404, if not present or expired\n- 5xx, upon server error\n\n### **Get Multiple Items**: POST /cache/getitems\n\nInput payload:\napplication/json array of keys that need to be fetched\n\nOutput payload:\napplication/json object containing all the key values found with format `{ \"key1\": \"value1\", \"key2\": \"value2\" ...}`\n\nHTTP status codes:\n\n- 200, upon success\n- 5xx, upon server error\n\n### **Put Item**: PUT /cache/item\n\nInput headers:\n`X-MC-Key` should be set to the Base64-encoded key.\n`X-MC-Exp` specifies the lifetime of the cache entry, in seconds, after which 404-Not-Found will be returned.\n\nInput payload:\napplication/octet-stream payload to be stored as the cached value.\n\nOutput:\napplication/json payload `{ \"result\": true }` indicating success.\n\nHTTP status codes:\n\n- 200, upon success\n- 5xx, upon server error\n\n### **Put Multiple Items**: PUT /cache/items\n\nInput payload:\napplication/json array of objects with format `{ \"key\": string, \"value\": string, \"exp\": number}`, each of them representing a value `value` that will be set with key `key` and expiration lifetime in seconds of `exp`.\n\nOutput:\napplication/json payload `{ \"result\": true }` indicating success.\n\nHTTP status codes:\n\n- 200, upon success\n- 5xx, upon server error\n\n### Administration\n\n- **Identity**: GET /\n- **Cache stats and health check**: GET /stats\n\n## Authentication\n\nThe routes at `/cache` can be set to require basic authentication.\nSee [Configuration](#configuration) below.\n\n## Configuration\n\nExamines `PORT` environment variable for microservice listen port,\nor uses the express app default: 3000.\n\nExamines `UPSTREAM` environment variable for upstream memcached\nserver location. Multiple upstream servers are not supported.\nDefault, if not supplied: 127.0.0.1:11211\n\nExamines `AUTH_USER` and `AUTH_PASSWORD` environment variables for enabling authentication on the cache routes when both are set.\n\n## Running\n\n```sh\nnpm start\n```\n\nwhich runs `bin/www`\n\n## Testing\n\nBefore running end-to-end tests, start an instance of `memcached`:\n\n```sh\nnpm run start:memcached\n```\n\nThen run the end-to-end test suite:\n\n```sh\nnpm run test:e2e\n```\n\nAlternatively, run end-to-end coverage tests:\n\n```sh\nnpm run coverage:e2e\n```\n\nFinally, shut down `memcached`:\n\n```sh\ndocker-compose down\n```\n\n## Deployment\n\nFor deploying a new version:\n\n*  use [npm version](https://docs.npmjs.com/cli/v8/commands/npm-version) to update the version in a new branch. For example:\n```\ngit checkout -b 0.3.0\nnpm version minor\n```\n\n* push the changes and create a PR. \n\n* Once the PR is merged, apply a tag to the repository corresponding to the new version. \n\nAfter this, a new docker image will be built and pushed to [dockerhub](https://hub.docker.com/r/bloq/memproxyjs).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloq%2Fmemproxyjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbloq%2Fmemproxyjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloq%2Fmemproxyjs/lists"}