If you don’t have time to do research then surely you don’t have time to learn a new tool, right? Just use Express.
Asking others isn’t research?
Ask HN: Is Express still "de-facto" for building Node back ends?
61–70 of 100 posts
Re: Ask HN: Is Express still "de-facto" for building Node back ends?
#62Nitro is the server baked into nuxt 3. I feel like web server frameworks have all been circling around the same set of features for like 10 years though.
Re: Ask HN: Is Express still "de-facto" for building Node back ends?
#63Last I checked, Express is extremely slow and will significantly impact your SEO if you're a content business and doesn't really scale very well if you get huge amounts of traffic like I have. These days I use Go, Deno or Crystal which is much faster. For hosting I recommend Cloudflare Pages, Vercel, (maybe Netlify) and Render.
Express by itself isn't slow at all, neither does if affect your SEO. You completely ignored OP's question, lol.
Nobody building a serious application in 2020 should consider express anymore for building a production grade application.
Re: Ask HN: Is Express still "de-facto" for building Node back ends?
#64Follow-up question: Is there any backend framework which uses the fetch API. That is, where requests are standard Request objects ( https://developer.mozilla.org/en-US/docs/Web/API/Request ) and where you send (or return, or yield) standard Response objects ( https://developer.mozilla.org/en-US/docs/Web/API/Response )? I’m teaching a highschool kid web development and it would be very nice to be able to teach the sam…
In addition to using standard Request and Response objects in its built-in server framework, Deno's approach to dependencies and TypeScript lends itself really well to educational settings—with no compilation step and no package management step, it's as simple to get started with Deno server-side as it is to start with HTML/JS in the browser—just open up a text editor and start writing!
Re: Ask HN: Is Express still "de-facto" for building Node back ends?
#65Not only is expressjs de-facto , it actually is a community design from before Node.js existed, with earlier implementations (connect, jackjs), including on non-Node.js SSJS-platforms; cf. [1]. Moreover, an expressjs/JSGI middleware can plug-in and directly run off the Node.js core http API, without the additional expressjs routing, etc. [1]: https://wiki.commonjs.org/wiki/JSGI/Level0/A/Draft2
It also seems like the modern .NET Core Http request pipeline and minimal API are inspired by express.
Re: Ask HN: Is Express still "de-facto" for building Node back ends?
#66There's Fastify but I still prefer Express.
Re: Ask HN: Is Express still "de-facto" for building Node back ends?
#67I love threads like this, it's so stereotypical JS. OP asks if it's the de-facto choice which it objectively is, but everyone recommends their pet project or favourite library instead.
Out of the 21 top level comments, all but two mentioned one or more of: fastify, express, kora, hona, adnos, bun/elysia
Half of them recommended Fastify.
Other results: 3 express, 2 hono, 2 bun/elysia, 1 adnos
Re: Ask HN: Is Express still "de-facto" for building Node back ends?
#68Earlier quoted context omitted.
Could you share a bit more of your reasoning for choosing Fastify over Express and how was your experience since you switched? Express is my go-to but I'm always open to improving my ways.
Is Express.js still even maintained? Does it still adds new features? Also switched to Fastify. It has a great ecosystem and community. It's also easy to write custom plugins.
Re: Ask HN: Is Express still "de-facto" for building Node back ends?
#69Follow-up question: Is there any backend framework which uses the fetch API. That is, where requests are standard Request objects ( https://developer.mozilla.org/en-US/docs/Web/API/Request ) and where you send (or return, or yield) standard Response objects ( https://developer.mozilla.org/en-US/docs/Web/API/Response )? I’m teaching a highschool kid web development and it would be very nice to be able to teach the sam…
Isn't that what node-fetch is for? https://www.npmjs.com/package/node-fetch
What I’m looking for is a server framework (like express.js) which uses these standards instead of their home made APIs. So instead of:
app.use(json());
app.get("/echo", (req, res) {
const { message } = req.body;
res.append("Content-Type", "application/json");
res.send(JSON.stringify({ message }));
});
I could write something like: app.get("/echo", async (request) => {
const { message } = await request.json();
const headers = new Headers([[ "Content-Type", "application/json" ]]);
return new Response(
JSON.stringify({ message }),
{ headers },
);
});Re: Ask HN: Is Express still "de-facto" for building Node back ends?
#70Follow-up question: Is there any backend framework which uses the fetch API. That is, where requests are standard Request objects ( https://developer.mozilla.org/en-US/docs/Web/API/Request ) and where you send (or return, or yield) standard Response objects ( https://developer.mozilla.org/en-US/docs/Web/API/Response )? I’m teaching a highschool kid web development and it would be very nice to be able to teach the sam…
I think Deno could be a good choice for that—it's an entire server side JavaScript runtime built around the idea of using web standards instead of server-specific code. In addition to using standard Request and Response objects in its built-in server framework, Deno's approach to dependencies and TypeScript lends itself really well to educational settings—with no compilation step and no package management step, it's…
Only problem is it is kind of hard to justify teaching Deno when Node is so overwhelmingly used in the industry.