Hacker News

New stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Swarm Scaling(tobyord.com)
    discuss
  2. A WIP Lego Sorter: Maybe a million pounds is possible [video](youtube.com)
    discuss
  3. Artificial Intelligence in Research(tmodrzyk.github.io)
    discuss
  4. CNN Mood 'Like a Funeral' as Paramount Acquires Warner Bros(variety.com)
    1comments
  5. Show HN: Palette, a Figma plugin that turns one color into a whole UI system(figma.com)
    discuss
  6. AUGUSTOSFACES(augusto.at)
    discuss
  7. What is the World's Loveliest Language(economist.com)
    discuss
  8. Xounds Redux and FruitMenu Redux(totallynotmalicious.com)
    discuss
  9. Design your programming languages right (2024)(veritates.love)
    discuss
  10. U.S. Government seizes 54-pound Martian meteorite sold at auction last year(nytimes.com)
    2comments
  11. A Taxonomy for Navigating the Global Landscape of AI Regulation (2025)(acm.org)
    discuss
  12. The 38 most influential Bluesky posters(bsky38.com)
    discuss
  13. Trump Renames Artificial Intelligence to Super Intelligence(washingtonpost.com)
    2comments
  14. The Mac Mini M6 is the fastest way to.. emulate a Windows 98 Pentium II machine(nyaa.sh)
    discuss
  15. Show HN: A fast, offline Markdown viewer for macOS built in Swift(github.com/temir-dev)
    discuss
  16. About Impersonation Risk Detection(support.apple.com)
    discuss
  17. Trump orders AI rebrand as "super intelligence"(axios.com)
    2comments
  18. Neo-Median Voter Model(betonit.ai)
    discuss
  19. Simple-jev by featherless AI – Turn context into clear decisions(featherless.ai)
    1comments
  20. How to Escape the Algorithm(raahelbaig.com)
    discuss
  21. What Does Childhood Trauma Have to Do with White Supremacy?(psychologytoday.com)
    2comments
  22. Inspiring Applications of Spin Model Checker(spinroot.com)
    discuss
  23. Show HN: WavexAI – Unlimited tokens for a fixed cost(wavexai.dev)
    3comments
  24. Show HN: Open-source Express-like HTTP server in C++(amsozzer.com)
    discuss
  25. Daily Bible Verse Wordle Game(lordle.net)
    2comments
  26. The Mystery of "Medbeds"(slate.com)
    discuss
  27. Decentralized Social Medias(github.com/salamimommy)
    discuss
  28. DigitalOcean Managed Agents(digitalocean.com)
    discuss
  29. Claude Opus 5.5 vs. GPT-6 Sol: Cost per correct task, not price per token(aipricing.guru)
    discuss
  30. I Agreed to Join Agmai(proofsandprompts.com)
    1comments

Show HN: Open-source Express-like HTTP server in C++

1 pointsby 39m agoamsozzer.com
0 comments
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 <PlusWeb/HttpServer.h>

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 << "listening on :3000\n"; });
}

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 scales up

For example: At 5 Routes PlusWeb is 4.8x faster than express whereas at 10,000 routes it is 253x faster than express

Playground: https://amsozzer.com/projects/plusweb It is available to use on https://github.com/Amsozzer1/PlusWeb

Some more profiling info available on https://github.com/Amsozzer1/PlusWeb/blob/main/PROFILING_REP...

Learn more about my mistakes building PlusWeb and how I fixed them on https://amsozzer.com/writing/i-could-not-understand-express-...

A quiet thread, for now.Start the conversation on HN ↗