{"id":19908914,"url":"https://github.com/monkeydioude/moon","last_synced_at":"2026-01-22T07:33:48.937Z","repository":{"id":57577074,"uuid":"136752991","full_name":"monkeydioude/moon","owner":"monkeydioude","description":"Tiny Go server runner with easy routing and simple handlers","archived":false,"fork":false,"pushed_at":"2024-08-07T21:52:23.000Z","size":3383,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-12T01:32:32.618Z","etag":null,"topics":["go","server"],"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/monkeydioude.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-06-09T19:48:21.000Z","updated_at":"2024-08-07T21:52:26.000Z","dependencies_parsed_at":"2024-11-12T21:13:52.201Z","dependency_job_id":"e58efdf4-a35e-46c3-bd4a-a06e5888db63","html_url":"https://github.com/monkeydioude/moon","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/monkeydioude/moon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeydioude%2Fmoon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeydioude%2Fmoon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeydioude%2Fmoon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeydioude%2Fmoon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monkeydioude","download_url":"https://codeload.github.com/monkeydioude/moon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeydioude%2Fmoon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28658107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["go","server"],"created_at":"2024-11-12T21:13:49.157Z","updated_at":"2026-01-22T07:33:48.919Z","avatar_url":"https://github.com/monkeydioude.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Moon is a wrapper for http.Handler, making it way way easier to declare and handles route\n[![Build Status](https://travis-ci.org/monkeydioude/moon.svg?branch=master)](https://travis-ci.org/monkeydioude/moon)\n\nSimple example:\n```golang\n\tfunc main() {\n\t\tserver := moon.Moon()\n\t\t// Me API es su API\n\t\tserver.AddHeader(\"Access-Control-Allow-Origin\", \"*\")\n\n\t\tserver.MakeRouter(\n\t\t\t// Will call routeHandler1() func every time a GET on \"/handler1\" URI is caught\n\t\t\tmoon.Get(\"/handler1\", routeHandler1),\n\t\t\t// This will match any \"/handler1/*\" GET request and create a \"param1\" parameter \n\t\t\t// in moon.Request.Matches containing the matched value by the {param1} pattern\n\t\t\tmoon.Get(\"/handler1/{param1}\", routeHandler1bis),\n\t\t)\n\n\t\tmoon.ServerRun(\":8080\", server)\n\t}\n```\n\n### What it does\n- Define routes using Patterns and a HTTP method\n- Not use Regexp for Route Pattern matching\n- Give matched parts of the Route Pattern as well as any query strings inside the `moon.Request` \n\n### Handlers\n```golang\n\tfunc aHandler(r *moon.Request) ([]byte, int, error)\n```\n\nTake:\n- a `*moon.Request` containing a simplified HTTP Request (Parts of the uri matched, query string \u0026 headers)\n\nReturn:\n- `[]byte` containing the text response\n- `int`, as the http status code\n- `error`, as an error, for logging purpose\n\n\n\n### [Detailed example(s) available here](./examples)\n\nSee [Moon's GoDoc](https://godoc.org/github.com/monkeydioude/moon) for Documentation.\n\nThis project still lacks:\n- Tests (ongoing)\n- Benchs\n- ~~Matching without using RegExp ?~~\n- Response Caching ?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkeydioude%2Fmoon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonkeydioude%2Fmoon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkeydioude%2Fmoon/lists"}