{"id":24655020,"url":"https://github.com/pascalpost/codecrafters-http-server-cpp","last_synced_at":"2025-03-21T02:16:13.029Z","repository":{"id":246827910,"uuid":"822044901","full_name":"pascalPost/codecrafters-http-server-cpp","owner":"pascalPost","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-14T11:09:43.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-25T22:39:32.491Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/pascalPost.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-06-30T06:40:01.000Z","updated_at":"2024-07-14T11:09:47.000Z","dependencies_parsed_at":"2025-01-25T22:35:59.461Z","dependency_job_id":"e30eadaf-71e4-420e-8bb3-681f50ae6d5b","html_url":"https://github.com/pascalPost/codecrafters-http-server-cpp","commit_stats":null,"previous_names":["pascalpost/codecrafters-http-server-cpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalPost%2Fcodecrafters-http-server-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalPost%2Fcodecrafters-http-server-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalPost%2Fcodecrafters-http-server-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pascalPost%2Fcodecrafters-http-server-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pascalPost","download_url":"https://codeload.github.com/pascalPost/codecrafters-http-server-cpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244722747,"owners_count":20499154,"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":[],"created_at":"2025-01-25T22:35:54.837Z","updated_at":"2025-03-21T02:16:12.996Z","avatar_url":"https://github.com/pascalPost.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![progress-banner](https://backend.codecrafters.io/progress/http-server/b886c6d8-68c7-4ea4-9531-5e857c8479a2)](https://app.codecrafters.io/users/codecrafters-bot?r=2qF)\n\nThis is a starting point for C++ solutions to the\n[\"Build Your Own HTTP server\" Challenge](https://app.codecrafters.io/courses/http-server/overview).\n\n**Note**: If you're viewing this repo on GitHub, head over to\n[codecrafters.io](https://codecrafters.io) to try the challenge.\n\n# http-server-cpp\n\nThis repo contains my C++ style implementation of a http server to parse the codecrafters\nchallenge. The focus is not to pass the tests with minimal effort, but to provide a solution\nin the spirit of C++ (at least my understanding of it :wink:).\n\nThe features are:\n\n- allows to easily specify endpoints for the server:\n\n```cpp\nserver.add_endpoint(\"/\", [](const auto \u0026) -\u003e std::string { return \"HTTP/1.1 200 OK\\r\\n\\r\\n\"; });\n```\n\n- url patten matching: `/echo/{str}` will match `/echo/abc` and provide a mapping of `str`\n  to `abc`, e.g.:\n\n```cpp\n server.add_endpoint(\"/echo/{str}\", [](const auto \u0026matches) -\u003e std::string {\n     const std::string str = matches.at(\"str\");\n     return std::format(\"HTTP/1.1 200 OK\\r\\nContent-Type: text/plain\\r\\nContent-Length: {}\\r\\n\\r\\n{}\", str.size(),\n                        str);\n });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpascalpost%2Fcodecrafters-http-server-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpascalpost%2Fcodecrafters-http-server-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpascalpost%2Fcodecrafters-http-server-cpp/lists"}