{"id":16384748,"url":"https://github.com/saber2pr/mock","last_synced_at":"2026-05-15T00:30:23.563Z","repository":{"id":108571307,"uuid":"187235201","full_name":"Saber2pr/mock","owner":"Saber2pr","description":"mock server.","archived":false,"fork":false,"pushed_at":"2023-12-29T07:54:17.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-04T22:02:48.843Z","etag":null,"topics":["mock","server"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Saber2pr.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-05-17T14:56:06.000Z","updated_at":"2023-12-29T07:53:20.000Z","dependencies_parsed_at":"2025-01-02T17:00:18.365Z","dependency_job_id":null,"html_url":"https://github.com/Saber2pr/mock","commit_stats":null,"previous_names":["saber2pr/-saber2pr-mock"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saber2pr%2Fmock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saber2pr%2Fmock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saber2pr%2Fmock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saber2pr%2Fmock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Saber2pr","download_url":"https://codeload.github.com/Saber2pr/mock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240118329,"owners_count":19750471,"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","server"],"created_at":"2024-10-11T04:12:16.239Z","updated_at":"2026-05-15T00:30:23.412Z","avatar_url":"https://github.com/Saber2pr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @saber2pr/mock\n\n[![npm](https://img.shields.io/npm/v/@saber2pr/mock.svg?color=blue)](https://www.npmjs.com/package/@saber2pr/mock)\n\n\u003e mock server.\n\n```bash\n# from npm\nnpm install @saber2pr/mock -g\n\n# from github\ngit clone https://github.com/Saber2pr/mock.git\n```\n\n# Usage\n\n```bash\n# in you workspace root, execute:\nsmock # http://localhost:2333\n\n# smock \u003cport\u003e, like:\nsmock 3000 # http://localhost:3000\n\n# quick start\nnpx @saber2pr/mock\n```\n\n### in you workspace root must has a mock.json file:\n\nfor example:\n\n```json\n{\n  \"/\": \"hello world!\",\n  \"api\": {\n    \"user\": [\"saber2pr\", \"nanasaki\"],\n    \"com\": \"com\"\n  },\n  \"other\": \"233\"\n}\n```\n\nthe json data will be parsed to an array:\n\n```js\n;[\n  { key: '/', value: 'hello world!' },\n  { key: '/api/user', value: ['saber2pr', 'nanasaki'] },\n  { key: '/api/com', value: 'com' },\n  { key: '/other', value: '233' }\n]\n```\n\nthen config to server :)\n\n---\n\n## start\n\n```bash\nnpm install\n```\n\n```bash\nnpm start\n\nnpm test\n```\n\n\u003e Author: saber2pr\n\n---\n\n## develope and test\n\n\u003e you should write ts in /src\n\n\u003e you should make test in /src/test\n\n\u003e export your core in /src/index.ts!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaber2pr%2Fmock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaber2pr%2Fmock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaber2pr%2Fmock/lists"}