{"id":20285408,"url":"https://github.com/mramshaw/hazzard","last_synced_at":"2026-04-12T00:48:09.178Z","repository":{"id":42992026,"uuid":"200941082","full_name":"mramshaw/Hazzard","owner":"mramshaw","description":"Another REST API (this time with node.js)","archived":false,"fork":false,"pushed_at":"2024-10-10T06:08:28.000Z","size":928,"stargazers_count":0,"open_issues_count":15,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-14T08:12:03.566Z","etag":null,"topics":["chai","chai-http","mocha","node-js","nodejs","rest","rest-api","restful"],"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/mramshaw.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}},"created_at":"2019-08-07T00:10:26.000Z","updated_at":"2020-11-01T23:37:35.000Z","dependencies_parsed_at":"2024-09-18T13:13:52.265Z","dependency_job_id":null,"html_url":"https://github.com/mramshaw/Hazzard","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FHazzard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FHazzard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FHazzard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FHazzard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mramshaw","download_url":"https://codeload.github.com/mramshaw/Hazzard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241780465,"owners_count":20019058,"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":["chai","chai-http","mocha","node-js","nodejs","rest","rest-api","restful"],"created_at":"2024-11-14T14:26:30.446Z","updated_at":"2026-04-12T00:48:09.142Z","avatar_url":"https://github.com/mramshaw.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hazzard\n\n[![Build status](http://travis-ci.org/mramshaw/Hazzard.svg?branch=master)](http://travis-ci.org/mramshaw/Hazzard)\n[![GitHub release](http://img.shields.io/github/release/mramshaw/Hazzard.svg?style=flat-square)](http://github.com/mramshaw/Hazzard/releases)\n\n[![Known Vulnerabilities](https://snyk.io//test/github/mramshaw/Hazzard/badge.svg?style=plastic\u0026targetFile=package.json)](https://snyk.io//test/github/mramshaw/Hazzard?style=plastic\u0026targetFile=package.json)\n\nA simple RESTful endpoint with __node.js__ using [express](http://www.npmjs.com/package/express) and [superagent](http://www.npmjs.com/package/superagent).\n\nTesting will be carried out with [Mocha](http://mochajs.org/), [Chai](http://chaijs.com) and [Chai-HTTP](http://www.chaijs.com/plugins/chai-http/).\n\nLogging will be carried out with [morgan](http://www.npmjs.com/package/morgan).\n\n## Configuration defaults\n\nBy default the app will run on `localhost` port `5000`, but other values may be specified as follows:\n\n```bash\nexport HOST=127.0.0.1\n```\n\nOr:\n\n```bash\nexport PORT=3333\n```\n\n## Linting\n\nCode linting will be carried out with [ESLint](https://eslint.org/).\n\nLint the code as follows:\n\n```bash\nnpm run -s eslint .\n```\n\n## Testing\n\nTest the app as follows:\n\n```bash\nnpm test\n```\n\nThis should look as follows:\n\n![tests](images/tests.png)\n\nOr start the app (\u003ckbd\u003enpm start\u003c/kbd\u003e) and test with [curl](CURLs.txt).\n\n## Running\n\nStart the app as follows:\n\n```bash\nnpm start\n```\n\nThis should make our endpoint available at:\n\n    http://localhost:5000/v1/jukeboxes/\n\nAs usual, Ctrl-C to stop.\n\nIn a browser, this should look something like the following:\n\n![browser](images/browser.png)\n\n## Docker\n\nWe will use the LTS version (10.16.2-stretch) of node for our Docker build and tests.\n\nRunning \u003ckbd\u003edocker-compose up\u003c/kbd\u003e will trigger a docker build and start the app.\n\n[Ctrl-C and \u003ckbd\u003edocker-compose down\u003c/kbd\u003e to stop.]\n\nThis should look as follows:\n\n![docker-compose_up](images/docker-compose_up.png)\n\nAfter the build has been done, run the docker image as follows:\n\n```bash\ndocker run --rm -it -e HOST=0.0.0.0 -p 5000:5000 mramshaw4docs/jukeboxes:12.16.2-stretch\n```\n\nThis should look as follows:\n\n![docker](images/docker.png)\n\n## To Do\n\n- [x] Add various badges\n- [x] Dockerize everything\n- [x] Upgrade to latest LTS version of `node` (12.16.2-stretch)\n- [x] Update dependencies to allow for reported exploits\n- [ ] Add code coverage\n- [ ] Create an integration with `swagger-ui` (for exploring the API)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmramshaw%2Fhazzard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmramshaw%2Fhazzard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmramshaw%2Fhazzard/lists"}