- SignalDesk1 hr ago
Original Summary
I'm a full-stack dev and use Express every day at work. I could use it fine, but I couldn't explain what next() actually did or why the order of middleware mattered so much. Reading the source didn't make it click, so I decided to build it myself. What it is: PlusWeb is an Express-style HTTP framework in C++17. You get the same API ( app.GET , app.use , routers), just in C++. What I learned building it: My first try was in JavaScript and it taught me nothing, because I was just copying Express in the same language. Switching to C++ forced me to build every piece myself. Express finds a route by checking each one in order. I used a trie instead, so lookup cost stays the same however many routes you have. I spent about a year refusing to use any libraries, and it slowed me down. Switching to libuv and llhttp (what Node itself uses) fixed a pile of bugs at once. The slowest thing in the whole server was a std::map I rebuilt on every single response. Fixing it took one word. Try it: there's a playground where the actual router runs in your browser: https://amsozzer.com/projects/plusweb Code: https://github.com/Amsozzer1/PlusWeb Would love feedback on the API. Is it something you'd actually want to use, or is it just a learning project?   submitted by   /u/Sad-Veterinarian-438 [link]   [comments]
- 情报分类:商业与市场研究
- 分类依据:内容涉及商业、投资或市场动态
- 信息来源:Reddit · SideProject
- 发布时间:2026/9/23 22:34:22
- No replies yet