{"id":13510620,"url":"https://github.com/yesinteractive/dadjokes","last_synced_at":"2026-01-14T00:41:15.407Z","repository":{"id":57086610,"uuid":"234170856","full_name":"yesinteractive/dadjokes","owner":"yesinteractive","description":"Dadjokes.online: Microservice echo-service as an alternative to httpbin  for testing k8s, docker, kong, istio, kuma, etc.  Built on FSL php microframework. Who says testing and dev ops can't be fun?","archived":false,"fork":false,"pushed_at":"2024-02-03T12:22:37.000Z","size":4772,"stargazers_count":100,"open_issues_count":5,"forks_count":26,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-04T09:07:40.682Z","etag":null,"topics":["api","api-gateway","apigee","dad-jokes","dev","devops","docker","echo-server","httpbin","istio","jokes","k8s","kong","kubernetes","kubernetes-deployment","kuma","microservice","mulesoft","php","service-mesh"],"latest_commit_sha":null,"homepage":"http://dadjokes.online","language":"PHP","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/yesinteractive.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-01-15T20:51:44.000Z","updated_at":"2024-04-30T01:32:05.000Z","dependencies_parsed_at":"2024-06-02T04:45:00.720Z","dependency_job_id":"eb7e9c3e-d9dc-4e01-b058-4494008a5533","html_url":"https://github.com/yesinteractive/dadjokes","commit_stats":{"total_commits":69,"total_committers":2,"mean_commits":34.5,"dds":"0.24637681159420288","last_synced_commit":"ee5305f3c684530d76520234117aa78f906183dc"},"previous_names":["yesinteractive/dad-jokes_microservice"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/yesinteractive/dadjokes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yesinteractive%2Fdadjokes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yesinteractive%2Fdadjokes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yesinteractive%2Fdadjokes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yesinteractive%2Fdadjokes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yesinteractive","download_url":"https://codeload.github.com/yesinteractive/dadjokes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yesinteractive%2Fdadjokes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","api-gateway","apigee","dad-jokes","dev","devops","docker","echo-server","httpbin","istio","jokes","k8s","kong","kubernetes","kubernetes-deployment","kuma","microservice","mulesoft","php","service-mesh"],"created_at":"2024-08-01T02:01:47.214Z","updated_at":"2026-01-14T00:41:15.354Z","avatar_url":"https://github.com/yesinteractive.png","language":"PHP","readme":"# Dad Jokes Microservice #\n![Dad Jokes As A Microservice](https://raw.githubusercontent.com/yesinteractive/dad-jokes_microservice/master/public/dadjokes-microservice.png)\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/yesinteractive/dadjokes?style=for-the-badge)](https://hub.docker.com/r/yesinteractive/dadjokes) \n[![GitHub stars](https://img.shields.io/github/stars/yesinteractive/dadjokes?style=for-the-badge)](https://github.com/yesinteractive/dad-jokes_microservice) \n[![GitHub release](https://img.shields.io/github/release/yesinteractive/dadjokes?style=for-the-badge)](https://github.com/yesinteractive/dad-jokes_microservice) \n![MIT](https://img.shields.io/badge/license-MIT-green?style=for-the-badge)\n\n\n\nJust a sample humurous microservice or echo service used for testing API Gateways such as Kong, Kubernetes K8s, Openshift, Docker, \nService meshes such as Kuma or Istio, etc. as an alternative to httpbin. Feel free \nto [add your own jokes](https://github.com/yesinteractive/dadjokes/blob/master/controllers/jokes.txt) \nto this repo as well. In addition to a dad joke, the service will optionally echo back information about the \nincoming request. This is helpful for testing and troubleshooting things like API gateways or proxies. See below for instructions on how to\nenable echoing per request or by default.\n\n## Hosted Service / Demo ##\n\nAccess [http://dadjokes.online](http://dadjokes.online) to see the service in action.\n\n## Usage ##\n\n**Endpoint URI** : `/`\n\n**Method** : `GET` `POST` `PUT` `PATCH` `DELETE`\n\n**Parameters** : optional\n\n**Successful Response** : `200 OK`\n\n```json\n{\n  \"Joke\": {\n    \"Opener\": \"What did one wall say to the other wall?\",\n    \"Punchline\": \"I'll meet you at the corner.\",\n    \"Processing Time\": \"0.000537\"\n  },\n  \"DadJokesInfo\": {\n    \"SourceCode\": \"https://github.com/yesinteractive/dadjokes\",\n    \"Version\": \"20250315\"\n  }\n}\n```\n\n### ENABLING THE ECHO FEATURE ###\n\nTo enable the echoing of in the incoming request back into the response, simply add the docker environment variable `DADJOKES_NOECHO=FALSE` to your configuration or simply use the `/echo`  anywhere in\nyour request calls or as part of a query string. For example:\n\n**Endpoint URI** : `/echo/abc/efg/`\n\n**Method** : `GET` `POST` `PUT` `PATCH` `DELETE`\n\n**Parameters** : optional\n\n**Successful Response** : `200 OK`\n\n```json\n{\n  \"Joke\": {\n    \"Opener\": \"What do you call a deer with no eyes?\",\n    \"Punchline\": \"No idea!\",\n    \"Processing Time\": \"0.000434\"\n  },\n  \"RequestEcho\": {\n    \"Headers\": {\n      \"Host\": \"somehost.com\",\n      \"Connection\": \"keep-alive\",\n      \"sec-ch-ua\": \"\\\"Chromium\\\";v=\\\"134\\\", \\\"Not:A-Brand\\\";v=\\\"24\\\", \\\"Google Chrome\\\";v=\\\"134\\\"\",\n      \"sec-ch-ua-mobile\": \"?0\",\n      \"sec-ch-ua-platform\": \"\\\"Windows\\\"\",\n      \"DNT\": \"1\",\n      \"Upgrade-Insecure-Requests\": \"1\",\n      \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36\",\n      \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\",\n      \"Accept-Encoding\": \"gzip, deflate, br, zstd\",\n      \"Accept-Language\": \"en-US,en;q=0.9\",\n      \"Cookie\": \"mycooking=myvalue;\"\n    },\n    \"Method\": \"GET\",\n    \"Origin\": \"123.45.67.123\",\n    \"URI\": \"/echo/abc/efg/\",\n    \"Arguments\": {\n      \"uri\": \"/echo/abc/efg/\"\n    },\n    \"Data\": \"\",\n    \"URL\": \"https://somehost.com/echo/abc/efg/\"\n  },\n  \"DadJokesInfo\": {\n    \"SourceCode\": \"https://github.com/yesinteractive/dadjokes\",\n    \"Version\": \"20250315\"\n  }\n}\n```\n\n### BEHIND REVERSE PROXY CONFIGURATION ###\n\nIf behind an API gateway or reverse proxy, you may wish to have only the URI of the original request\nechoed back and not the URI of the upstream proxy target. To do this you may add the docker environment\nvariable `DADJOKES_BEHIND_PROXY=TRUE` to your configuration or set the global `behind_proxy`configuration\nto true in the `config/fsl_config.php` file.\n\n\n## Installation ##\n\n### Deployment Examples ###\n\nSee usage examples for Kubernetes, Kong for Kubernetes Ingress Controller, and docker-compose in the [examples directory folder.](https://github.com/yesinteractive/dad-jokes_microservice/blob/master/examples)\n\n### With Docker ###\n\nDocker image is Alpine 3.11 based running PHP 7.3 on Apache. The containter exposes both ports 8100 (HTTP) an 8143 (HTTPS) with a self signed certificated. If you wish to alter the container configuration, feel free to use the Dockerfile in this repo (https://github.com/yesinteractive/dad-jokes_microservice/blob/master/Dockerfile). Otherwise, you can pull the latest image from DockerHub with the following command:\n```\ndocker pull yesinteractive/dadjokes\n```\nTypical basic usage (below example exposes dadjokes on host ports 8100 and 8143 and enables auto echo of request data):\n\n```\n$ docker run -d \\\n  -p 8100:8100 \\\n  -p 8143:8143 \\\n  -e DADJOKES_NOECHO=FALSE \\\n  yesinteractive/dadjokes\n```\n\nTypical usage in Dockerfile:\n\n```\nFROM yesinteractive/dadjokes\nRUN echo \u003cyour commands here\u003e\n```\n\n\n","funding_links":[],"categories":["PHP","api"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyesinteractive%2Fdadjokes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyesinteractive%2Fdadjokes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyesinteractive%2Fdadjokes/lists"}