{"id":22768107,"url":"https://github.com/tombenke/rest-api-mock-archetype","last_synced_at":"2025-03-30T11:15:13.630Z","repository":{"id":138589156,"uuid":"103538943","full_name":"tombenke/rest-api-mock-archetype","owner":"tombenke","description":"A project archetype for rest-api mock server creation","archived":false,"fork":false,"pushed_at":"2017-09-14T14:20:10.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T12:52:22.027Z","etag":null,"topics":["archetype","boilerplate","boilerplate-template","rest","rest-api","rest-api-documentation"],"latest_commit_sha":null,"homepage":null,"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/tombenke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-09-14T13:57:37.000Z","updated_at":"2019-11-11T13:06:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"259a6426-ee41-4d67-ae6f-c912dbc36a00","html_url":"https://github.com/tombenke/rest-api-mock-archetype","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/tombenke%2Frest-api-mock-archetype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tombenke%2Frest-api-mock-archetype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tombenke%2Frest-api-mock-archetype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tombenke%2Frest-api-mock-archetype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tombenke","download_url":"https://codeload.github.com/tombenke/rest-api-mock-archetype/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246308051,"owners_count":20756482,"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":["archetype","boilerplate","boilerplate-template","rest","rest-api","rest-api-documentation"],"created_at":"2024-12-11T14:09:55.683Z","updated_at":"2025-03-30T11:15:13.625Z","avatar_url":"https://github.com/tombenke.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"{{package_name}}\n==================\n\n{{package_description}}\n\nIt is built on top of Express.js which runs on Node.js.\n\nIt reads the {{package_rest_api_module_name}} module, and provides a simple express server,\nwhich echoes the mock data defined under the services.\n\nYou can modify and extend this code as you like to fit your needs.\nThe `api.js` contains the implementation functions of the REST API calls which are referred from \nthe `service.yml` descriptor files.\n\n\n## Prerequisites\n\nIn order to run the server, you need to have the Node.js and npm installed on your machine.\n\n\n## Installation\n\nClone the [{{package_github_account}}/{{package_name}}](https://github.com/{{package_github_account}}/{{package_name}}) server into a folder:\n\n    clone git@github.com:{{package_github_account}}/{{package_name}}.git\n\nInstall the required dependencies:\n\n    cd {{package_name}}\n    npm install\n\n\n## Usage\n\n### Start the server\n\nTo start the server, execute the following command in the `server` folder:\n\nStart the mock server:\n\n    node server/server.js\n\n    register service GET /monitoring/isAlive\n    /monitoring/isAlive\n    register service GET /rtc\n    /rtc\n    ...\n\n    Express server listening on port 3007 in development mode\n\nCheck if the server is properly working via executing the following command \nin a separate console or opening the link with a browser:\n\n    $ curl http://localhost:3007/rest/monitoring/isAlive\n    true\n\n\n### Server configuration\n\nThe `server/config.yml` file contains the configuration parameters for the server.\n\nYou can define many parameters, including:\n\n- The folder of the web content for the UI\n- The proxy for the final version of implemented backend services\n- etc.\n\nYou can group these setting into so called modes, that you can select when you start the server.\nTo change the configuration, edit this `server/config.yml` file, and restart the server.\n\nYou also can add mock implementation logic,\nin case the built-in and dumb mock data responses are not enough for testing and frontend development.\nYou can find example for this in the `server/monitoring.js` file.\n\nTo learn more about the server and its configuration, or how to extend the mock functionality \nwith custom code visit the [rest-tool homepage](http://tombenke.github.io/rest-tool/) of the project, or\ngo directly to the [mock server documentation](http://tombenke.github.io/rest-tool/docs/server.html) pages.\n\n\n## todos\n\n- Add test\n    - Test each endpoint/method/testCase.\n\n## References\n\n- [{{package_name}}](https://github.com/{{package_github_account}}/{{package_name}})\n- [rest-tool homepage](http://tombenke.github.io/rest-tool/)\n- [rest-tool / mock server documentation](http://tombenke.github.io/rest-tool/docs/server.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftombenke%2Frest-api-mock-archetype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftombenke%2Frest-api-mock-archetype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftombenke%2Frest-api-mock-archetype/lists"}