{"id":17787674,"url":"https://github.com/atwayne/easy-mock","last_synced_at":"2025-04-02T00:20:57.736Z","repository":{"id":65460514,"uuid":"273261000","full_name":"atwayne/easy-mock","owner":"atwayne","description":"a node.js application that mocks api based on configuration","archived":false,"fork":false,"pushed_at":"2023-06-13T01:35:56.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T08:55:50.299Z","etag":null,"topics":["mock","proxy","routes","server"],"latest_commit_sha":null,"homepage":"https://github.com/atwayne/easy-mock","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/atwayne.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":"2020-06-18T14:32:04.000Z","updated_at":"2023-06-13T01:36:01.000Z","dependencies_parsed_at":"2025-02-07T15:42:13.905Z","dependency_job_id":"a524fc9b-61ff-4e5b-9d9d-6215f3957177","html_url":"https://github.com/atwayne/easy-mock","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/atwayne%2Feasy-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atwayne%2Feasy-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atwayne%2Feasy-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atwayne%2Feasy-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atwayne","download_url":"https://codeload.github.com/atwayne/easy-mock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246731071,"owners_count":20824501,"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":["mock","proxy","routes","server"],"created_at":"2024-10-27T10:12:28.040Z","updated_at":"2025-04-02T00:20:57.711Z","avatar_url":"https://github.com/atwayne.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Introduction\n\na node.js application that mocks api based on configuration\n\n## Features\n\n1.  mock response\n\n    configure routers so the api respond with provide json file, for example:\n\n    ```\n    { \"path\": \"/example\", \"data\": \"./data/example.json\", \"method\": \"get\" }\n    ```\n\n    then a request `GET /example` will get response with content of the file `./data/example.json`\n\n\n2.  default proxy\n\n    for all requests to a path that has not been defined in previous configuration, the api will work as a proxy and redirect the request to a specificed proxy server.\n\n    for example: given that `\"proxy\": \"http://localhost:9528\"` has been set, and path `/api/element/1` has not been mocked, then a request `GET /api/element/1` will be proxied to `http://localhost:9528/api/element/1` and get response from the proxy server.\n\n3.  cors allowed for all origins\n\n## Usage\n\n1.  `npm install`\n2.  locate `./src/config/default.json` for configuration\n3.  (optional) modify `app.port` to the port you want to host the mock api\n4.  (optional) modify `proxy` to the hostname of the proxy server, which will handle unrouted requests\n5.  update `routers` for mocks\n6.  `npm start`\n\n## Development plan\n\n-  [ ]   creat a webpage so user can configure in browser\n-  [ ]   create global executables\n-  [X]  ~~reload routers without restarting the api server~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatwayne%2Feasy-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatwayne%2Feasy-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatwayne%2Feasy-mock/lists"}