Ok, I'm going to be annoying here
But what's stopping Node.js from implementing a native HTTP server based on Web Standard Request/Response?
Like really? What's stopping it?
It's very clear the industry has moved into this
Runtime: Bun, Deno, Workerd/Cloudflare Worker, Vercel Function, Netlify Edge Function, Fastly Compute, Supabase Edge Function, even in your browser via Service Worker
Meta framework: Nextjs, Nuxt, Angular, SvelteKit, Tanstack Start, Astro, Remix, Waku
Even backend frameworks: Hono, Elysia, H3, every single Deno/Bun/Cloudflare Worker framework
Every single one uses Web Standard Request/Response, but the only major runtime that doesn't support it is Node.js?
I would urge that not implementing it is hurting the ecosystem
It makes the library/framework author have to implement their own adapter to convert from Node IncomingMessage/OutgoingMessage to Web Standard Request/Response just for the user to use it properly in a runtime that doesn't support it as an exception
It noticeably adds unnecessary work to maintainers and additional overhead in both compute and memory usage for YOUR servers
If you are using a meta framework, you are having a performance degradation compared to what it should be because Node.js simply decided not to implement this specific feature over the past years
"Oh but it is slow"
Implementing it in runtime native code has many more optimization options available than in userland, like lazy initialization, like how Deno does
And it can't possibly be worse than every framework paying adapter cost today
"Oh but that would be a breaking change"
No, Web Standard Request/Response exists but is just never used outside of fetch
http.createServer doesn't need to be removed; just create a new function that doesn't intersect with it, and that's just literally it
Node.js was even on the WinterCG committee (now WinterTC) to draft this standard, just to implement the bare minimum for fetch and not an HTTP Server?
Like come on
I'm willing to bet if you ask a maintainer of a framework that supports API routes how they feel about this, every single one will say they're not happy or at least annoyed
Personally, it felt like it's starting to get from the understandable zone into a really questionable zone
I know how frustrating it is for maintainers to get a request to support this or that, as I myself also don't like one either
But come on, when there's a standard already agreed on and used by everyone for years that even you yourself helped draft but just decided not to use it, you can't expect people not to complain about what makes their work harder
Do I have to draft a page requesting support and ask for the author of each framework/runtime to sign so we can have the evidence that the majority library/framework wants it?
Or do you need help to draft an API or implementation?
I'm willing to bet that many people would want this feature natively supported on Node.js, even I would be willing to help with it where I can
Show more