Earlier quoted context omitted.
Why are you referring to it as that?
The big new feature is a sandboxing with explicit CLI flag opt in to permissions, exactly like deno pioneered. Except there's zero mention of deno as a clear inspiration of the feature.
Node.js 20 is now available
51–60 of 101 posts
Re: Node.js 20 is now available
#52What is the standard web application backend framework for Node.js these days, is it Koa? As I understand it express is quite dated because of the callback structure. I have been confused recently with the moving best practices. What is the server architecture Next.js is most often plugged into?
The only exception is when I’m working inside an established Node shop where they already have a prolific framework, I’ll reach for what they already have in that case to avoid fragmenting their stack. Almost always, that’s express.
fastify is performant, thoughtfully designed, and well architected.
Re: Node.js 20 is now available
#53What is the standard web application backend framework for Node.js these days, is it Koa? As I understand it express is quite dated because of the callback structure. I have been confused recently with the moving best practices. What is the server architecture Next.js is most often plugged into?
Who cares how old something is, if it works well, why not use it? You can easily avoid callback-hell by making the callback you pass in to expressjs async and use await inside of it, without much drawbacks. Just because the first closure into express is a callback doesn't mean you need to use callbacks everywhere, just use await/generators/whatever you want in your application code. expressjs at this point is battle-…
Is it? It performs slower than e.g. Fastify. Don't see how that's doing well.
> Who cares how old something is, if it works well, why not use it?
It doesn't. That's the whole point. Software is always evolving and I doubt it's even close to complete. There hasn't been meaningful updates to Express in a long time. Why do people use it and/or promote it as a standard?
Re: Node.js 20 is now available
#54Earlier quoted context omitted.
The big problem is Express code like the following will either hang the HTTP request forever (--unhandled-rejections=warn), until the client times out and gives up, or crash your whole server, taking down any other HTTP requests in progress (--unhandled-rejections=throw): const db = { async getUsers() { throw new Error("failed to connect to database"); }, }; app.get("/", async (req, res) => { const result = await db.…
Already fixed in Express 5 (which is technically still in beta, but that just seems to be the maintainer being very conservative about a major release): https://expressjs.com/en/guide/error-handling.html > Starting with Express 5, route handlers and middleware that return a Promise will call next(value) automatically when they reject or throw an error. For example: > app.get('/user/:id', async (req, res, next) => { c…
There hasn't been a new beta in a long time. Last release about a year ago and then the 1 before that about 3 years ago. Not a very convincing beta.
Re: Node.js 20 is now available
#55With testing built into core, I’m looking forward to the reduction in complexity and number of external testing frameworks. I generally chose tape/ava in the past and vitest these days, but it’s awesome that now a very simple testing mechanism is available in core
A shame it's not using `expect` syntax, which recently was also adopted by bun.
expect(me).to.barf.when(i.see(shit.like(this)));Re: Node.js 20 is now available
#56Earlier quoted context omitted.
Already fixed in Express 5 (which is technically still in beta, but that just seems to be the maintainer being very conservative about a major release): https://expressjs.com/en/guide/error-handling.html > Starting with Express 5, route handlers and middleware that return a Promise will call next(value) automatically when they reject or throw an error. For example: > app.get('/user/:id', async (req, res, next) => { c…
> which is technically still in beta, but that just seems to be the maintainer being very conservative about a major release There hasn't been a new beta in a long time. Last release about a year ago and then the 1 before that about 3 years ago. Not a very convincing beta.
The maintainer said this three months ago in a comment on that issue:
> Express 5 is pretty much completed at this point, and we're just finishing up the last code merges in upstream modules in order to bump the dependencies finally in the 5.0 branch.
Re: Node.js 20 is now available
#57What is the standard web application backend framework for Node.js these days, is it Koa? As I understand it express is quite dated because of the callback structure. I have been confused recently with the moving best practices. What is the server architecture Next.js is most often plugged into?
Re: Node.js 20 is now available
#58With testing built into core, I’m looking forward to the reduction in complexity and number of external testing frameworks. I generally chose tape/ava in the past and vitest these days, but it’s awesome that now a very simple testing mechanism is available in core
Same. Every time I dive into a repo using Jest it infuriates me. So slow. The built in test runner is great.
Re: Node.js 20 is now available
#59What is the standard web application backend framework for Node.js these days, is it Koa? As I understand it express is quite dated because of the callback structure. I have been confused recently with the moving best practices. What is the server architecture Next.js is most often plugged into?
Re: Node.js 20 is now available
#60Earlier quoted context omitted.
A shame it's not using `expect` syntax, which recently was also adopted by bun.
expect(me).to.barf.when(i.see(shit.like(this)));