{"id":17726969,"url":"https://github.com/fs02/mockingbird","last_synced_at":"2025-03-31T15:25:47.482Z","repository":{"id":89836620,"uuid":"85089540","full_name":"Fs02/mockingbird","owner":"Fs02","description":"Dead simple mock and proxy service for third-party API. Useful for testing and development.","archived":false,"fork":false,"pushed_at":"2017-10-25T18:00:04.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T12:16:47.054Z","etag":null,"topics":[],"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/Fs02.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":"2017-03-15T15:31:10.000Z","updated_at":"2024-05-01T12:16:47.055Z","dependencies_parsed_at":null,"dependency_job_id":"7324bc8d-a626-4752-8426-44c33d15ac13","html_url":"https://github.com/Fs02/mockingbird","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fs02%2Fmockingbird","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fs02%2Fmockingbird/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fs02%2Fmockingbird/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fs02%2Fmockingbird/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fs02","download_url":"https://codeload.github.com/Fs02/mockingbird/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246489533,"owners_count":20785882,"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-10-25T17:22:17.696Z","updated_at":"2025-03-31T15:25:47.441Z","avatar_url":"https://github.com/Fs02.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mockingbird\n\nDead simple mock and proxy service for third-party API. \nUseful for testing and development.\n\n## Usage\n**Running service:**\n1. Create [configuration](https://www.npmjs.com/package/config) files.\n2. Start server\n\t```\n\tnpm start\n\t```\n\n\n**Accessing third-party API:**\n\nCan be done as usual. Just follow this format:\n```\nhttp://[address]:[port]/[site]/[rest_resources]\n```\n\nExample for configuration below:\n```\nhttp://jsonplaceholder.typicode.com/comments?postId=1\n```\nbecomes:\n```\nhttp://localhost:4000/placeholder/comments?postId=1\n```\n\n**Clear caches:**\n\n```\nhttp://localhost:4000/~clear\n```\n\n## Configuration\n\nExample:\n```\n$ vim config/default.json\n```\n```\n{\n  \"port\": 4000,\n  \"sites\": {\n    \"placeholder\": {\n      \"host\": \"http://jsonplaceholder.typicode.com\"\n      \"proxy\": false,\n      \"expiry\": 60,\n      \"excludeRequestHeaders\": [\n        \"accept-encoding\"\n      ]\n    }\n  }\n}\n```\n\n- **port**: Custom port, default is 3000.\n- **sites**: List of registered services.\n- **host**: Original endpoint.\n- **proxy**: Whether to proxy or to mock, default is false.\n- **expiry**: Cache expiry time in seconds, default is 86400 (24h).\n- **excludeRequestHeaders**: Request headers to be excluded, default is empty.\n\n## Notes\n- For some sites like jsonplaceholder, it's necessary to exclude `accept-encoding` request header:\n  ```\n  \"excludeRequestHeaders\": [\n      \"accept-encoding\"\n  ]\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffs02%2Fmockingbird","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffs02%2Fmockingbird","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffs02%2Fmockingbird/lists"}