{"id":20485589,"url":"https://github.com/yeehanchung/local-mock-api","last_synced_at":"2026-03-07T07:33:36.706Z","repository":{"id":110972766,"uuid":"291407595","full_name":"yeehanchung/local-mock-api","owner":"yeehanchung","description":"For faster local testing and prototyping","archived":false,"fork":false,"pushed_at":"2021-01-30T04:42:53.000Z","size":70239,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T16:36:49.924Z","etag":null,"topics":["api","rest-api","restful-api"],"latest_commit_sha":null,"homepage":"","language":null,"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/yeehanchung.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-30T05:38:14.000Z","updated_at":"2021-07-08T14:04:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"3f7577da-a6e7-48d3-9549-936dde909f75","html_url":"https://github.com/yeehanchung/local-mock-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yeehanchung/local-mock-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeehanchung%2Flocal-mock-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeehanchung%2Flocal-mock-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeehanchung%2Flocal-mock-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeehanchung%2Flocal-mock-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeehanchung","download_url":"https://codeload.github.com/yeehanchung/local-mock-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeehanchung%2Flocal-mock-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30209740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T05:23:27.321Z","status":"ssl_error","status_checked_at":"2026-03-07T05:00:17.256Z","response_time":53,"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":["api","rest-api","restful-api"],"created_at":"2024-11-15T16:31:48.065Z","updated_at":"2026-03-07T07:33:36.690Z","avatar_url":"https://github.com/yeehanchung.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple API for testing\n\n- Able to `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `OPTIONS`.\n- Changes are persisted between calls.\n\n## Getting started\n\n1. Clone this repository on terminal `git clone \u003curl\u003e`.\n2. Open cloned directory `simple-api-for-testing`.\n3. If you haven't installed `json-server`, type `npm i json-server` on terminal to install.\n4. After installation, start JSON Server locally by typing `json-server --watch db.json` on terminal.\n5. Server is started locally on `http://localhost:3000`.\n\n\n## 🚨 Issue\n\n\n### 1. `Missing write access to .../node_modules`?\n\nRun this command: `sudo chown -R $USER /usr/local/lib/node_modules`\n\n- `sudo` means running the command as the system super user, root user.\n- `chown` changes the owner of the file or folder.\n- `-R` changes the owner, so that we can get root access to all files inside the node_modules folder.\n- `$USER` is an environment variable, and by default it is your system username.\n- Finally, you can `npm install -g json-server`.\n\n\n## `db.json`\n\n```json\n{\n  \"player\": [\n    {\n      \"id\": 1,\n      \"name\": \"John Doe\",\n      \"hobbies\": [\n        \"Cycling\",\n        \"Netlix\",\n        \"Travelling\"\n      ],\n      \"addresses\": [\n        {\n          \"addressId\": \"1\",\n          \"postalCode\": \"7400\",\n          \"country\": \"Malaysia\",\n          \"state\": \"Kuala Lumpur\",\n          \"line1\": \"Jane Street, 191\"\n        }\n      ]\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Marry Lane\",\n      \"hobbies\": [\n        \"Rock climbing\",\n        \"Eating\"\n      ],\n      \"addresses\": [\n        {\n          \"addressId\": \"1\",\n          \"postalCode\": \"2100\",\n          \"country\": \"Malaysia\",\n          \"state\": \"Selangor\",\n          \"line1\": \"Elementi, 200\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n\n## References\n\n1. [JSON Server](https://www.npmjs.com/package/json-server) from npmjs.\n2. [How to fix the \"Missing write access\" error when using npm](https://flaviocopes.com/npm-fix-missing-write-access-error/).\n3. [RESTful API Design - PUT vs PATCH](https://medium.com/backticks-tildes/restful-api-design-put-vs-patch-4a061aa3ed0b).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeehanchung%2Flocal-mock-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeehanchung%2Flocal-mock-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeehanchung%2Flocal-mock-api/lists"}