πŸ” Search
Sign in to post
Show HN: Open-source Express-like HTTP server in C++https://amsozzer.com/projects/plusweb

Hey guys, I made an open-source Express like non blocking HTTP Server library in C++. Starting a new web server is as simple as initiating the app with the desired port (8080 default) and start registering routes. #include int main() { HttpServer app(3000); app.GET("/users/:id", [](HttpRequest& req, HttpResponse& res) { res.status(200).send(nlohmann::json{ {"id", req.params["id"]}, {"name", "ada"}, }); }); app.serve([] { std::cout } It supports middleware chaining and since it uses tries for storing routes instead of a flat array like Express, the performance gets better as the application sc…

β†—

0trust.social media

Loading your media...

Pick a GIF β€” Giphy

Loading GIFs...