{"id":18784894,"url":"https://github.com/ghostbar/hapi-hiredis","last_synced_at":"2025-07-12T17:33:37.774Z","repository":{"id":25311535,"uuid":"28738208","full_name":"ghostbar/hapi-hiredis","owner":"ghostbar","description":"Hapi's hiredis plugin","archived":false,"fork":false,"pushed_at":"2015-10-23T00:11:36.000Z","size":148,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-05T06:07:46.732Z","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":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghostbar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-03T07:45:25.000Z","updated_at":"2015-09-07T23:10:52.000Z","dependencies_parsed_at":"2022-07-25T12:32:11.997Z","dependency_job_id":null,"html_url":"https://github.com/ghostbar/hapi-hiredis","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ghostbar/hapi-hiredis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbar%2Fhapi-hiredis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbar%2Fhapi-hiredis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbar%2Fhapi-hiredis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbar%2Fhapi-hiredis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostbar","download_url":"https://codeload.github.com/ghostbar/hapi-hiredis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostbar%2Fhapi-hiredis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265025508,"owners_count":23699760,"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-07T20:44:23.647Z","updated_at":"2025-07-12T17:33:37.735Z","avatar_url":"https://github.com/ghostbar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"hapi-hiredis\n============\n\nHapi (^8.0) plugin for `redis` with `hiredis` parser.\n\nWhy use this instead of simple hapi-redis?\n------------------------------------------\n\n+ `hiredis` parser is way faster than the plain javascript parser that comes by default with the node `redis` module.\n+ Support for URLs. At least for me that's a major point, since I store all the data for connections in a simple URL string.\n\nInstall\n-------\n\n    npm install --save hiredis hapi-hiredis\n\nRegister plugin\n---------------\n\nYou can pass as options either an URL (all are optionals, defaults to: no password, 127.0.01 and 6379) or `host` and `port`. Obviously passing an URL is way more convenient.\n\n    var Hapi = require('hapi');\n    var server = new Hapi.Server();\n\n    server.register({\n      register: require('hapi-hiredis'),\n      opts: { url: 'redis://:password@domain.tld:port' }\n    }, function (err) {\n      if (err) console.error(err);\n    });\n\nUse plugin\n----------\n\nThe object returned by `redis.createClient` is exposed on `server.plugins['hapi-hiredis'].client` and binded to the context on routes and extensions as `this.redis`.\n\n    server.route({\n      method: 'GET',\n      path: '/hashes',\n      handler: function (request, reply) {\n        var redis = request.server.plugins['hapi-hiredis'].client;\n        redis.hgetall('hashes', function (err, obj) {\n          reply(obj);\n        });\n      }\n    }, {\n      method: 'GET',\n      path: '/session',\n      handler: function (request, reply) {\n        var redis = this.redis;\n        redis.get('session', function (err, obj) {\n          reply(obj);\n        });\n      }\n    });\n\nIf for any reason you need to use the `redis` library, then you can use it from `server.plugins['hapi-hiredis'].library`.\n\nLicense\n-------\n\nLicensed under the terms of the ISC. A copy of the license can be found in the file `LICENSE`.\n\n© 2015, Jose-Luis Rivas `\u003cme@ghostbar.co\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostbar%2Fhapi-hiredis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostbar%2Fhapi-hiredis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostbar%2Fhapi-hiredis/lists"}