{"id":15676422,"url":"https://github.com/ije/rex","last_synced_at":"2026-01-11T21:54:02.947Z","repository":{"id":34648088,"uuid":"170878398","full_name":"ije/rex","owner":"ije","description":"Yet another web framework in Go.","archived":false,"fork":false,"pushed_at":"2025-12-27T09:38:36.000Z","size":439,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-27T20:10:42.683Z","etag":null,"topics":["go","golang","web"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ije.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,"zenodo":null}},"created_at":"2019-02-15T14:34:24.000Z","updated_at":"2025-12-27T09:38:27.000Z","dependencies_parsed_at":"2023-12-19T04:21:56.564Z","dependency_job_id":"5e849454-9e6c-4d6d-8444-fb58b206c6f3","html_url":"https://github.com/ije/rex","commit_stats":{"total_commits":430,"total_committers":3,"mean_commits":"143.33333333333334","dds":"0.28604651162790695","last_synced_commit":"1df0dea08f6d2bfeeac1ac7b1cb7e84f2253be4e"},"previous_names":["ije/wsx"],"tags_count":169,"template":false,"template_full_name":null,"purl":"pkg:github/ije/rex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ije%2Frex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ije%2Frex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ije%2Frex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ije%2Frex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ije","download_url":"https://codeload.github.com/ije/rex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ije%2Frex/sbom","scorecard":{"id":483420,"data":{"date":"2025-08-11","repo":{"name":"github.com/ije/rex","commit":"8425b407a58a265f49ae8682ecade99b38aaae76"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T17:11:32.156Z","repository_id":34648088,"created_at":"2025-08-19T17:11:32.156Z","updated_at":"2025-08-19T17:11:32.156Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28324408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"last_error":"SSL_read: 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":["go","golang","web"],"created_at":"2024-10-03T16:01:51.665Z","updated_at":"2026-01-11T21:54:02.941Z","avatar_url":"https://github.com/ije.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REX\n\n[![GoDoc](https://godoc.org/github.com/ije/rex?status.svg)](https://godoc.org/github.com/ije/rex)\n[![GoReport](https://goreportcard.com/badge/github.com/ije/rex)](https://goreportcard.com/report/github.com/ije/rex)\n[![MIT](https://img.shields.io/badge/license-MIT-green)](./LICENSE)\n\nYet another web framework in Go.\n\n## Installation\n\n```bash\ngo get -u github.com/ije/rex\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n  \"context\"\n  \"log\"\n  \"github.com/ije/rex\"\n)\n\nfunc main() {\n  // use middlewares\n  rex.Use(\n    rex.Logger(log.Default()),\n    rex.Cors(rex.CorsAll()),\n    rex.Compress(),\n  )\n\n  // match \"GET /\" route\n  rex.GET(\"/{$}\", func(ctx *rex.Context) any {\n    return rex.Render(\n      rex.Tpl(\"\u003ch1\u003eMy Blog\u003c/h1\u003e\u003cul\u003e{{range .}}\u003cli\u003e{{.Title}}\u003c/li\u003e{{end}}\u003c/ul\u003e\"),\n      posts.List(),\n    )\n  })\n\n  // match \"GET /posts/:id\" route\n  rex.GET(\"/posts/{id}\", func(ctx *rex.Context) any {\n    post, ok := posts.Get(ctx.PathValue(\"id\"))\n    if !ok {\n      return rex.Err(404, \"post not found\")\n    }\n    return post\n  })\n\n  // match \"POST /posts\" route\n  rex.POST(\"/posts\", func(ctx *rex.Context) any {\n    return posts.Add(ctx.FormValue(\"title\"), ctx.FormValue(\"author\"), ctx.FormValue(\"content\"))\n  })\n\n  // match \"DELETE /posts/:id\" route\n  rex.DELETE(\"/posts/{id}\", func(ctx *rex.Context) any {\n    ok := posts.Delete(ctx.PathValue(\"id\"))\n    return ok\n  })\n\n  // Starts the server\n  \u003c-rex.Start(context.Background(),80, nil)\n\n  // Starts the server with autoTLS\n  \u003c-rex.StartWithAutoTLS(context.Background(), 443, nil)\n}\n```\n\nMore usages please check [examples/](./examples).\n\n## Middleware\n\nIn **REX**, a middleware is a function that receives a `*rex.Context` and returns a `any`. If the returned value is not `rex.Next()`, the middleware will return the value to the client, or continue to execute the next middleware.\n\n```go\nrex.Use(func(ctx *rex.Context) any {\n  if ctx.Pathname() == \"/hello\" {\n    // return a html response\n    return rex.HTML(\"\u003ch1\u003ehello world\u003c/h1\u003e\")\n  }\n\n  // use next handler\n  return ctx.Next()\n})\n```\n\n## Routing\n\n**REX** uses [ServeMux Patterns](https://pkg.go.dev/net/http#ServeMux) (requires Go 1.22+) to define routes.\n\nPatterns can match the method, host and path of a request. Some examples:\n\n- `/index.html` matches the path `/index.html` for any host and method.\n- `GET /static/` matches a GET request whose path begins with `/static/`.\n- `example.com/` matches any request to the host `example.com`.\n- `example.com/{$}` matches requests with host `example.com` and path `/`.\n- `/b/{bucket}/o/{objectname...}` matches paths whose first segment is `b` and whose third segment is `o`. The name `bucket` denotes the second segment and `objectname` denotes the remainder of the path.\n\nIn general, a pattern looks like:\n```\n[METHOD ][HOST]/[PATH]\n```\n\nYou can access the path params via calling `ctx.PathValue(paramName)`:\n\n```go\nrex.GET(\"/posts/{id}\", func(ctx *rex.Context) any {\n  return fmt.Sprintf(\"ID is %s\", ctx.PathValue(\"id\"))\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fije%2Frex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fije%2Frex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fije%2Frex/lists"}