{"id":28528515,"url":"https://github.com/igorkosta/chav","last_synced_at":"2026-05-03T18:32:15.044Z","repository":{"id":57197329,"uuid":"68189747","full_name":"igorkosta/chav","owner":"igorkosta","description":"chav is a hapi plugin to create static routes from json files","archived":false,"fork":false,"pushed_at":"2017-02-06T10:24:07.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-27T22:28:32.237Z","etag":null,"topics":["hapi","hapi-plugin","hapijs","json","node","npm"],"latest_commit_sha":null,"homepage":"","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/igorkosta.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":null,"security":null,"support":null}},"created_at":"2016-09-14T08:48:24.000Z","updated_at":"2017-05-19T15:28:01.000Z","dependencies_parsed_at":"2022-09-16T13:11:44.992Z","dependency_job_id":null,"html_url":"https://github.com/igorkosta/chav","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/igorkosta/chav","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkosta%2Fchav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkosta%2Fchav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkosta%2Fchav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkosta%2Fchav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorkosta","download_url":"https://codeload.github.com/igorkosta/chav/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkosta%2Fchav/sbom","scorecard":{"id":482722,"data":{"date":"2025-08-11","repo":{"name":"github.com/igorkosta/chav","commit":"abb244ca96f457a40be305b6e2e82a85cb55b8a2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T17:01:03.020Z","repository_id":57197329,"created_at":"2025-08-19T17:01:03.020Z","updated_at":"2025-08-19T17:01:03.020Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32579735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["hapi","hapi-plugin","hapijs","json","node","npm"],"created_at":"2025-06-09T12:42:35.574Z","updated_at":"2026-05-03T18:32:15.038Z","avatar_url":"https://github.com/igorkosta.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chav [ ![Codeship Status for igorkosta/chav](https://codeship.com/projects/6d00f750-632c-0134-e217-22dce1a7050d/status?branch=master)](https://codeship.com/projects/175290)\nSometimes in life you just want to serve static `json` content as an API route.\n\n`chav` is a hapi.js plugin to serve a static `json` file as an API route. Per default the file under `static/static.json` is served as `GET /statics`\n\n## Installation\n`npm install --save chav`\n\n## Usage\nAs long as you don't provide any options, we'll assume that the file you want to be served is called `static.json` and is located in the `static` folder of your app.\nThe `/static` route is not protected.\nThese are the defaults we're using. If you want to override the `servable` or the `path` just provide your `options` on plugin registration.\n\n```\nconst defaults = {\n  servable: 'static/static.json',\n  path: '/statics',\n  tags: ['static', 'route'],\n  description: 'Renders static route defined in a file',\n  responses: {\n    statusCode: 400,\n    message: 'No static routes found'\n  },\n  auth: false\n};\n```\n\nYou can override `servable`, `path`, `tags` and `description`.\n\nWhen you register your plugin with e.g. `glue`:\n\n```\n{\n  \"plugin\": {\n    \"register\": \"chav\",\n    \"options\": {\n                 \"servable\" : \"static/foobar.json\"\n               }\n  }\n}\n```\n\n## TODOs\n- Whenever the `json` file has more than one array (see example below), try to also offer the `/statics/beers` and `/statics/snacks` routes\n\n```\n{\n  \"beers\" : [\n\n  ],\n  \"snacks\" : [\n\n  ]\n}\n```\n\n- Check if the `servable` is actually a `file` or a `directory` and if it's a `directory` serve every file as an API route, e.g. file name is a route name.\n\n## License\n[MIT](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorkosta%2Fchav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorkosta%2Fchav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorkosta%2Fchav/lists"}