{"id":13685756,"url":"https://github.com/alexrios/endpoints","last_synced_at":"2026-04-11T21:54:33.143Z","repository":{"id":64302158,"uuid":"261325594","full_name":"alexrios/endpoints","owner":"alexrios","description":"The tiniest http endpoints simulator","archived":false,"fork":false,"pushed_at":"2024-04-23T22:44:28.000Z","size":40,"stargazers_count":30,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T06:12:04.604Z","etag":null,"topics":["emulator","endpoint","hacktoberfest","mocking-server","simulator"],"latest_commit_sha":null,"homepage":"","language":"Go","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/alexrios.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-05-05T00:23:40.000Z","updated_at":"2024-05-31T19:55:56.000Z","dependencies_parsed_at":"2022-12-06T07:19:05.533Z","dependency_job_id":"0a76b4d1-e593-4ea4-a2e7-120ca6f66179","html_url":"https://github.com/alexrios/endpoints","commit_stats":{"total_commits":50,"total_committers":2,"mean_commits":25.0,"dds":0.24,"last_synced_commit":"cf5cfc9b4b2bb0729ad4ef566168ea0597163b5d"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexrios%2Fendpoints","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexrios%2Fendpoints/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexrios%2Fendpoints/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexrios%2Fendpoints/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexrios","download_url":"https://codeload.github.com/alexrios/endpoints/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143678,"owners_count":21054820,"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":["emulator","endpoint","hacktoberfest","mocking-server","simulator"],"created_at":"2024-08-02T14:00:56.989Z","updated_at":"2026-04-11T21:54:28.113Z","avatar_url":"https://github.com/alexrios.png","language":"Go","readme":"The tiniest HTTP endpoints simulator\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/alexrios/endpoints)](https://goreportcard.com/report/github.com/alexrios/endpoints)\n[![Download shield](https://img.shields.io/github/downloads/alexrios/endpoints/total)](https://img.shields.io/github/downloads/alexrios/endpoints/total)\n\n\n# Endpoints\n\n### Usage\nDownload your binary [here](https://github.com/alexrios/endpoints/releases/latest)\n\nOn terminal\n```shell script\n$ endpoints \n```\n\nOr, if you are into containers\n\nOn terminal\n```shell script\n$ docker run ghcr.io/alexrios/endpoints:latest\n```\n\nYou should see \n```\nINFO[0000] [GET] / -\u003e 200 with body -\u003e customBody.json \nINFO[0000] Listen at :8080                              \n```\n\n#### Defaults\n* address - \":8080\"\n* method - \"GET\"\n* latency - 0ms\n* status code - 200\n\n#### Configuration file\n##### endpoints.json\n\nAll features example:\n```json\n{\n  \"address\": \":8080\",\n  \"responses\": [\n    {\n      \"path\": \"/\",\n      \"status\": 201,\n      \"latency\": \"400ms\",\n      \"method\": \"POST\",\n      \"json_body\": \"customBody.json\"\n    }\n  ]\n}\n```\n\nNote: json_body is the file location of the body file.\n\n##### Body interpolation with path variables\nNow you want to interpolate an identifier on the response body. How to do it?\n\nLet's add another response on `responses`.\n```json\n{\n  \"address\": \":8080\",\n  \"responses\": [\n    {\n      \"path\": \"/\",\n      \"status\": 200,\n      \"latency\": \"400ms\",\n      \"method\": \"POST\",\n      \"json_body\": \"customBody.json\"\n    },\n    {\n      \"path\": \"/{id}/sales\",\n      \"status\": 201,\n      \"latency\": \"400ms\",\n      \"method\": \"GET\",\n      \"json_body\": \"interpolated.json\"\n    }\n  ]\n}\n```\nAnd now, we'll use templating notation to use this response body as a template.\n##### interpolated.json\n```\n{\n  \"id\": {{ .id}}\n}\n```\n\n## Status\nThis project is under development.\n","funding_links":[],"categories":["Conteúdo"],"sub_categories":["Projetos"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexrios%2Fendpoints","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexrios%2Fendpoints","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexrios%2Fendpoints/lists"}