{"id":18459848,"url":"https://github.com/sayjava/faker-server","last_synced_at":"2025-04-23T18:12:38.817Z","repository":{"id":191360399,"uuid":"684052218","full_name":"sayjava/faker-server","owner":"sayjava","description":" The easiest and quickest way to a build a Shopify/E-Commerce Storefront without having to connect to a real Shopify store.","archived":false,"fork":false,"pushed_at":"2023-09-04T06:35:24.000Z","size":430,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T18:12:21.802Z","etag":null,"topics":["fakerjs","handlebars","mock-server","mocking"],"latest_commit_sha":null,"homepage":"https://faker-server.dev/shopify","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/sayjava.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":"2023-08-28T11:02:01.000Z","updated_at":"2024-11-25T09:34:46.000Z","dependencies_parsed_at":"2024-11-06T08:28:46.846Z","dependency_job_id":"5cfd502f-bd03-43ed-9d29-bb05d1c39362","html_url":"https://github.com/sayjava/faker-server","commit_stats":null,"previous_names":["sayjava/faker-server"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayjava%2Ffaker-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayjava%2Ffaker-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayjava%2Ffaker-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayjava%2Ffaker-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sayjava","download_url":"https://codeload.github.com/sayjava/faker-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250487535,"owners_count":21438612,"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":["fakerjs","handlebars","mock-server","mocking"],"created_at":"2024-11-06T08:24:40.750Z","updated_at":"2025-04-23T18:12:38.784Z","avatar_url":"https://github.com/sayjava.png","language":"TypeScript","readme":"# Faker Server\n\nFaker Server is a zero config filesystem based mock server using handlebars and fakerjs.\n\n## Features\n\n- Zero configuration required. Just start the server and you're ready to go.\n- Filesystem based routing for REST and GraphQL API.\n- Utilize Handlebars templates to define the structure of the fake data.\n- Leverage the extensive capabilities of Faker.js to generate various types of data.\n\n## Getting Started\n\nPull the docker image\n\n```bash \ndocker pull gcr.io/sayjava/faker-server\n```\n\nGenerate a template file\n\n```bash\necho \"Hello World\" \u003e templates/hello.hbs\n```\n\nStart the server and point it to the templates directory\n\n```bash\ndocker run -p 8080:8080 -v $(pwd)/templates:/app/templates -it --rm faker-server\n```\n\n## Presets\n\nFaker Server comes with a few presets that you can use to quickly generate fake data for your GraphQL API. You can also create your own presets by adding a file to the `templates/presets` directory.\n\n```bash\ndocker run -p 8080:8080 -it --rm faker-server --preset templates/shopify\n```\n\nSome Included presets:\n\n- [Shopify](/presets/shopify/README.md)\n- [Weather](/presets/weather/README.md) (Coming Soon)\n- [Github](/presets/github/README.md) (Coming Soon)\n\n\n### REST API\n\nFilesystem based routing is used to define the REST API. The server will look for a file with the same name as the request method in the `templates` directory. For example, a `GET` request to `/users` will look for a file named `users.hbs` in the `templates` directory.\n\n```bash\ncurl -X GET \\\n  http://localhost:9001/users \\\n  -H 'Content-Type: application/json'\n```\n\n#### URL Parameters\n\n```bash\ncurl -X GET \\\n  'http://localhost:9001/users/2/posts' \\\n  -H 'Content-Type: application/json'\n```\n\n#### URL Query\n\n```bash\ncurl -X GET \\\n  'http://localhost:9001/users?_limit=10\u0026_page=1\u0026_sort=id\u0026_order=asc' \\\n  -H 'Content-Type: application/json'\n```\n\n### GraphQL API\n\nThe GraphQL API is defined in the `schema.graphql` file. The server will look for this file in the `templates` directory. The GraphQL API is served at a url that includes `graphql`. For example, `/graphql` or `/api/graphql`.\n\n\n\n```bash\ncurl -X POST \\\n  http://localhost:9002/graphql \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"query\": \"{ user { id name email } }\"\n}'\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayjava%2Ffaker-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsayjava%2Ffaker-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayjava%2Ffaker-server/lists"}