{"id":27568750,"url":"https://github.com/0xxff/nodeuv-http","last_synced_at":"2025-04-20T22:01:52.187Z","repository":{"id":20224909,"uuid":"23496696","full_name":"heapwolf/cxx-http","owner":"heapwolf","description":"A simple http library in c++ backed by libuv and http-parser.","archived":false,"fork":false,"pushed_at":"2019-02-06T02:00:28.000Z","size":386,"stargazers_count":183,"open_issues_count":6,"forks_count":37,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-14T03:12:42.277Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","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/heapwolf.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}},"created_at":"2014-08-30T17:15:49.000Z","updated_at":"2024-10-06T19:29:59.000Z","dependencies_parsed_at":"2022-07-27T01:02:16.878Z","dependency_job_id":null,"html_url":"https://github.com/heapwolf/cxx-http","commit_stats":null,"previous_names":["hij1nx/nodeuv-http","0xxff/nodeuv-http"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fcxx-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fcxx-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fcxx-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heapwolf%2Fcxx-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heapwolf","download_url":"https://codeload.github.com/heapwolf/cxx-http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249967654,"owners_count":21353281,"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-04-20T22:01:51.154Z","updated_at":"2025-04-20T22:01:52.173Z","avatar_url":"https://github.com/heapwolf.png","language":"C++","funding_links":[],"categories":["TODO scan for Android support in followings"],"sub_categories":[],"readme":"# SYNOPSIS\n\nA simple http server backed by [`libuv`](https://github.com/joyent/libuv)\nand [`http-parser`](https://github.com/joyent/http-parser).\n\n# EXAMPLE\n\n## SERVER ([API](https://github.com/hij1nx/nodeuv-http/wiki/Server-Documentation))\n```cpp\n\n#include \"http.h\"\n\nusing namespace http;\n\nint main () {\n\n  Server server([](auto \u0026req, auto \u0026res) {\n\n    res.setStatus(200);\n    res.setHeader(\"Content-Type\", \"text/plain\");\n    res.setHeader(\"Connection\", \"keep-alive\");\n\n    res \u003c\u003c req.method \u003c\u003c \" \" \u003c\u003c req.url \u003c\u003c endl;\n\n  });\n\n  server.listen(\"0.0.0.0\", 8000);\n}\n```\n\n## CLIENT ([API](https://github.com/hij1nx/nodeuv-http/wiki/Client-Documentation))\n```cpp\n\n#include \"http.h\"\n\nusing namespace http;\n\nint main () {\n\n  Client client(\"http://google.com\", [](auto \u0026res) {\n    cout \u003c\u003c res.body \u003c\u003c endl;\n  });\n\n}\n```\n\n# PERFORMANCE\n\nJust for fun. Without any real statistical significance, here are\nsome quick averages from apache ab, run on an old macbook air. Also\nneat is that `nodeuv-http` server uses about `400KB` of memory \n(compared to Node.js' `10-15MB`).\n\n### nodeuv-http\n```\nRequests per second:    16333.46 [#/sec] (mean)\n```\n\n### node.js\n```\nRequests per second:    3366.41 [#/sec] (mean)\n```\n\n# COMPATIBILITY\nRuns on `OSX`, `Linux` and `Windows`.\n\n# DEVELOPMENT\n\n## REQUIREMENTS \n\n### OSX, Linux\nThis project is made to work with C++11/14. So you'll either need\nfairly recent, stable releases of GCC (`~4.8.x`) or Clang (`~4.2.x`).\n\n### Windows\nWindows doesn't have a compatible make tool. So you'll have to run \nthis `build.bat` file to clone repos and run `gyp`.\n\n## DEBUGGING\n\n### VALGRIND\n\n```bash\nvalgrind --leak-check=yes --track-origins=yes --dsymutil=yes ./server\n```\n\n## BUILD\n\n```bash\nmake\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xxff%2Fnodeuv-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xxff%2Fnodeuv-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xxff%2Fnodeuv-http/lists"}