{"id":23326169,"url":"https://github.com/leonmanolo/rex","last_synced_at":"2026-04-14T00:05:16.070Z","repository":{"id":266642698,"uuid":"895556334","full_name":"LeonManolo/rex","owner":"LeonManolo","description":"Express inspired webserver in Rust","archived":false,"fork":false,"pushed_at":"2024-12-19T12:26:19.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T06:43:54.783Z","etag":null,"topics":["expressjs","rest-api","rust","rust-crate","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/LeonManolo.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":"2024-11-28T12:35:21.000Z","updated_at":"2024-12-19T12:26:22.000Z","dependencies_parsed_at":"2024-12-05T10:33:24.737Z","dependency_job_id":"c9631767-6fa1-4e46-ab43-d2c86c811009","html_url":"https://github.com/LeonManolo/rex","commit_stats":null,"previous_names":["leonmanolo/rex"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonManolo%2Frex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonManolo%2Frex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonManolo%2Frex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LeonManolo%2Frex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LeonManolo","download_url":"https://codeload.github.com/LeonManolo/rex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608163,"owners_count":20965950,"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":["expressjs","rest-api","rust","rust-crate","rust-lang"],"created_at":"2024-12-20T19:14:42.442Z","updated_at":"2026-04-14T00:05:16.037Z","avatar_url":"https://github.com/LeonManolo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rex Webserver\n\nRex is express.js inspired. Rex is a simple, lightweight, and extensible web server written in Rust. It allows you to define routes and handle HTTP requests with ease. This README provides an overview of the Rex web server, its features, and how to get started.\n\n## Features\n\n- **Routing**: Define routes for different HTTP methods (GET, POST, DELETE, etc.).\n- **Path Parameters**: Extract parameters from the URL path.\n- **Query Parameters**: Access query parameters from the URL.\n- **Multithreading**: Handle multiple requests concurrently using threads.\n- **Custom Responses**: Send custom text or JSON responses.\n\n## Getting Started\n\n### Prerequisites\n\n- Rust (latest stable version)\n\n### Installation\n\nClone the repository:\n\n```sh\ngit clone https://github.com/yourusername/rex-webserver.git\ncd rex-webserver\n```\n### Usage\n\nDefine your routes and start the server in the main.rs file.\n\n```rs\napp.get(\"/users/:id\", |request, response| {\n        println!(\"Hallo von /users/:id\");\n        println!(\"body: {}\", request.body);\n\n        let my_custom_query_param = request.query_params.get(\"myparam\");\n        let my_custom_query_param2 = request.query_params.get(\"myotherparam\");\n\n        let id = request.param(\"id\");\n\n        response.set_header(\"my-custom-header\", \"custom-header-value\");\n\n        let response_text = format!(\n            \"My awesome body! myparam: {} and myotherparam: {} and my param path param id is = {}\",\n            my_custom_query_param.unwrap_or(\u0026String::new()),\n            my_custom_query_param2.unwrap_or(\u0026String::new()),\n            id.unwrap_or(String::new()),\n        );\n\n        return response.send_text(response_text.as_str());\n    });\n```\n\n### Running the Server\n\nTo run the server, use the following command:\n```sh\ncargo run\n```\nThe server will start and listen on 127.0.0.1:8080.\n\n#### Example Requests\n- GET /users/:id: Handles requests to /users/:id and extracts the id parameter.\n- POST /courses/:id: Handles POST requests to /courses/:id.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonmanolo%2Frex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleonmanolo%2Frex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonmanolo%2Frex/lists"}