Stop Using Express.js in 2023 (2024)

Matvey Ryabchikov

Posted on • Originally published at blog.ronanru.com

Stop Using Express.js in 2023 (3) Stop Using Express.js in 2023 (4) Stop Using Express.js in 2023 (5) Stop Using Express.js in 2023 (6) Stop Using Express.js in 2023 (7)

#javascript #express #webdev #typescript

For years, express.js has been the standard choice for building REST APIs with JavaScript or TypeScript. It has around 30 million weekly downloads (twice as much as React), and nearly all beginner tutorials recommend it. However, in today's landscape, there are now alternatives that offer better developer experiences and performance. In this post, we'll explore some of these alternatives and why you should consider them over Express.

What's wrong with Express?

1. It's Unmaintained

Express hasn't seen any major updates or new features in years, with its website last being updated in 2017.

2. It's Slow

Since Express is primarily written in pre-ES6 JavaScript, it misses out on years of performance-enhancing updates and concepts.

3. It doesn't work well with TypeScript

Express wasn't designed with TypeScript in mind and requires a separate types package to work with it. Despite this, you will still encounter lots of anys.

Alternatives to Express

Fastify

Fastify is a modern alternative to Express. It's significantly faster and has a vast ecosystem of plugins. It shares a similar syntax with Express, so most of your Express knowledge will still apply to Fastify. With @fastify/express package, you can even use any express middleware module with fastify. Fastify is the most similar to express out of these alternatives, and It's the easiest to switch to. Use Fastify instead of Express for your next API to get instant performance and DX improvements.

Learn more about Fastify

Hono

Hono is a simple and minimal web framework that is even faster than Fastify. Although it lacks many of plugins, it can still handle most use cases. The primary selling point of Hono is that it can be used with runtimes other than Node.js, like Deno, Bun, or Cloudflare Edge Workers. Using Hono with these runtimes can make it even faster, cheaper and easier to host.

Learn more about Hono

tRPC

If you're building an API solely to consume it in a TypeScript client application (such as a React app), consider using tRPC. With this library, you can declare a function on your backend, and after a simple setup, call it on the frontend. tRPC automatically infers the input and return types of the function, resulting in TypeScript error messages and IntelliSense.

Learn more about tRPC

Top comments (13)

Subscribe

Rihan

Rihan

Passionate about technology.

  • Location

    United Kingdom

  • Joined

May 25 '23

  • Copy link

Another really nice alternative is Nitro nitro.unjs.io/

meitrix8208

meitrix8208

  • Education

    Corporación universitaria latinoamericana

  • Joined

Jul 8 '23

  • Copy link

And if you need something lower and simpler you can try h3, also by unjs (nitro uses it below)

Good reminder. Still can see Express tutorials even on Dev.to.
There's also Koa which is designed to succeed Express, & is well maintained. The code also looks very similar to Express.

sara john

sara john

  • Joined

Nov 21 '23 • Edited on Jan 15 • Edited

  • Copy link

Koa is not well maintained. Commits are few and far between. 1 guy carries it vs. 4 for fastify. links here: github.com/koajs/koa/graphs/contri... and github.com/fastify/fastify/graphs/...

Tobuf🇺🇦

Tobuf🇺🇦

  • Joined

Mar 1 '23

  • Copy link

Good job

Hassan Aoutof

Hassan Aoutof

  • Joined

Jan 6

  • Copy link

i would very much disagree with an opinion saying that a framework is bad because it's not actively being maintained, for example express is truthfully not being updated each month but that's because they have nothing to fix, it's reliable, working, almost 0 bug issues, i'd say express is better than any actively maintained alternative just because it doesn't need to be fixed, it's working. and no matter how shiny any other framework is until it's reliable and it's code base is rarely updated it's still going to be a second choice after express, one of the few frameworks you can use without fear.

sara john

sara john

  • Joined

Jan 26 • Edited on Jan 26 • Edited

  • Copy link

When node changes, express has to as well. If the ecosystem moves forward, express has to as well. Stagnation leads to death.

Hassan Aoutof

Hassan Aoutof

  • Joined

Jan 26

  • Copy link

I would still have to disagree; Node, although one of the worst languages in this aspect, doesn't change its APIs that much. It just adds to them or fixes some security issues. The serious security issues are below 60, counting since 2012, and they were all issues that all active versions and even non-active versions had. So, it doesn't really matter if you're using Node 20; you would still live through one or two vulnerability discoveries in OpenSSL, V8 memory, filesystem, and more. Of course, you would have to update to an active version just for the sake of updates. Up to 2023, v14 was still active, so v14 was just like v20 in terms of security updates and bug fixes. Now it's dead, though.

With that said, do you really think that not implementing arr.at(-1) instead of arr[arr.length - 1] matters? I don't think so. We want reliability, security, and performance. Sadly, not much is gained in these areas with each update. Let's take v20; first, they created a broken runtime, and now they want to patch it with --experimental-permission. And that's not even something Express can use. You can use it with Express if you want, but it wouldn't need any updates from the side of Express. Most other updates we had since v16 or v17 are all just additions or external changes to the runtime itself.

If you criticize Express for the lack of activity, I'm assuring you there are a lot of devs like me who are happy to see no bugs/few bugs in the issues tab. If you criticize it for not implementing the new stuff and that it's slow, then you should've used GO, C#.... The version of Node you use is your choice; Express will always be more secure than most frameworks, break less. That's what I personally want.

But if you're criticizing it for not using HTTP/2, then I'm with you. If you criticize the middlewares that attach a million unnecessary things to the req/res objects, then I'm with you. If you criticize its although rare security vulnerabilities, then I'm with you.

But just changing something for the sake of change is a problem, not a solution.

sara john

sara john

  • Joined

Jan 26 • Edited on Jan 26 • Edited

  • Copy link

Fair point about change for sake of change being a problem.

I was reading someone's reddit comment about fastify vs. express and there are big DX benefits to fastify. I quote:

"I have used express since 2013. A year and a half ago our company began building our new services with node and I ended up selecting fastify.

I prefer fastify’s encapsulation design, the plug-in system, and it’s support for json schema and fastifys lifecycle design. It also works nicely with type box and typescript

Express isn’t nearly as featureful as fastify anymore or as fast.

Fastify wins by a long shot for me."

Source: https://www.reddit.com/r/node/comments/zwcl6j/comment/j1w379u/?context=3&rdt=41318

Hassan Aoutof

Hassan Aoutof

  • Joined

Jan 26

  • Copy link

i agree, Fastify wins in DX, Performance and even plugin ecosystem, i used it couple of times and it's great, it offers far more than what he/she mentioned, almost all frameworks (the main ones) are great, i've only commented on this post because the writer has done a bad job at explaining why we need to abandon express and his only criticism is that it's dead, if that's true then most packages in Golang are dead and by his/her logic google is dump for using dead packages.

sara john

sara john

  • Joined

Jan 27

  • Copy link

I agree, the post is written badly

Sebastian Wessel

Sebastian Wessel

Developer nerd and founder of PURISTA open source typescript framework

  • Location

    Frankfurt am Main, Germany

  • Work

    Freelancer developer with focus on typescript backends

  • Joined

Jun 1 '23

  • Copy link

Totally agree!

I wonder why this article isn’t exploding like mine here:
dev.to/sebastian_wessel/stop-using...

sara john

sara john

  • Joined

Jan 26

  • Copy link

This article has no evidence, links to no evidence, and so is poorly written.

For further actions, you may consider blocking this person and/or reporting abuse

Stop Using Express.js in 2023 (2024)

FAQs

Stop Using Express.js in 2023? ›

Yes, the Express module is good for mobile application development too. It is scalable, speedy, and provides great performance for enterprise-level apps that may need to handle a lot of requests and notifications from users.

Is ExpressJS still used in 2024? ›

Yes, the Express module is good for mobile application development too. It is scalable, speedy, and provides great performance for enterprise-level apps that may need to handle a lot of requests and notifications from users.

Is next JS replacing Express? ›

js is not a direct replacement for Express. js. Next. js focuses on React-based web applications with server-side rendering, whereas Express.

Is node js good in 2023? ›

Node. js stays on top in 2023 because it syncs seamlessly with the widespread use of JavaScript in web development. It makes things simpler by letting developers use one language for both frontend and backend, reducing the learning curve. The “JavaScript Everywhere” approach continues to be a strong reason behind Node.

Is ExpressJS still popular? ›

ExpressJS is one of the most popular frameworks for building web applications in NodeJS. It has been around since 2010, and since then, it has gained strong developer community backing. According to Statista, over 20% of developers worldwide use ExpressJS.

Is ExpressJS still being used? ›

This framework is one of the most widely used node. js tools, and there's good reason for its immense popularity. Not only is express. js fast, but it is also unopinionated and minimalist, making it ideal for developers seeking flexibility and control over their applications.

Is Fastify better than Express? ›

If you value stability, a wealth of resources, and a vast community, Express is the way to go. However, if you're looking for a faster, more efficient alternative with built-in validation and serialization, Fastify is an excellent option.

Should I learn Express or NextJS? ›

And the main difference between ExpressJS and NextJS is that, If you are building an API or a server-side application, then the ideal option would be to use ExpressJS as it is lightweight, flexible, fast, has a large developer community, and comes with certain plugins for app development.

Is nestjs better than Express? ›

Nestjs is designed to provide a structured and modular approach, making it easier to build and maintain large-scale applications, whereas Expressjs offers more flexibility but may require additional setup for scalability.

Is Flask better than Express? ›

For lightweight, performant web applications or rapid prototyping, Flask shines. Its minimalist design, familiarity of Python, and flexibility empower you to build web applications efficiently. For scalable web applications demanding high traffic handling and a modular approach, Express. js excels.

Is NodeJS worth it in 2024? ›

Node. js is known for its fast performance, event-driven architecture, and non-blocking I/O model, making it ideal for building scalable and efficient network applications. It has a rich ecosystem of libraries and modules through npm (Node Package Manager), making it easy to extend its functionality.

Which js framework is best in 2023? ›

The Top 7 Most Popular JavaScript Frameworks and Libraries for Web Development
  • Angular.
  • React. js.
  • Vue. js.
  • Node. js.
  • jQuery.
  • Express. js.
  • Next. js.
Nov 16, 2023

Should I learn PHP or Node JS in 2023? ›

Who wins? PHP is an easy programming language, but then if you want to add complex features to web applications, you need to learn more in PHP, while NodeJs code is lengthy, but you don't need to learn more languages. So as far as coding is concerned in PHP vs Node Js, Node Js is the clear winner.

Should I use Express or Node? ›

When should I choose between ExpressJS and NodeJS? You should choose JavaScript runtime environment when you need a server-side runtime environment for JavaScript. On the other hand, you can choose Express JS when you want to build web applications or APIs with a structured framework on top of Node JS.

Which is better, Django or Express? ›

In Django vs Express. js performance comparison, Express is much faster than Django. Django is generally considered a slow framework that can affect your website development phase. But performance issues can be easily negated by experienced developers.

Which is better PHP or ExpressJS? ›

In general, Node. js offers faster execution and better request handling due to its asynchronous and event-driven architecture. PHP, on the other hand, operates in a synchronous manner, which can lead to slower performance in some cases, especially when dealing with large numbers of simultaneous requests.

Is ExpressJS in demand? ›

It is widely used in the Node. js ecosystem and is known for its simplicity, speed, and ease of use. Express. js is suitable for both small projects as well as large-scale applications, making it a popular choice for web development.

Does NodeJS have a future? ›

Over the last four years, NodeJS development has become increasingly popular due to its ability to compete with other options, and this popularity is projected to continue in 2023. Startups all over the world are choosing NodeJS for their projects because of its robustness and scalability.

What is next in ExpressJS? ›

The next function is a function in the Express router which, when invoked, executes the middleware succeeding the current middleware. Middleware functions can perform the following tasks: Execute any code. Make changes to the request and the response objects.

Does Express still need body parser? ›

Originally, there was only body-parser , not express. json() , which is why many older tutorials recommend installing body-parser . More recently, Express added the . json() function to the core Express package, so there's no longer any need to install and use body-parser directly.

Top Articles
NiceHash Review 2023: Is NiceHash Exchange Scam or Legit?
Ethereum 2 Taxes After the Merge
Spectrum Gdvr-2007
Patreon, reimagined — a better future for creators and fans
Inducement Small Bribe
Access-A-Ride – ACCESS NYC
How To Do A Springboard Attack In Wwe 2K22
Identifont Upload
Toyota Campers For Sale Craigslist
Comforting Nectar Bee Swarm
Lost Ark Thar Rapport Unlock
Zitobox 5000 Free Coins 2023
Acts 16 Nkjv
Is Csl Plasma Open On 4Th Of July
Flat Twist Near Me
Apnetv.con
Violent Night Showtimes Near Amc Fashion Valley 18
Mndot Road Closures
Jesus Revolution Showtimes Near Chisholm Trail 8
Strange World Showtimes Near Amc Braintree 10
Clairememory Scam
Select Truck Greensboro
Mlb Ballpark Pal
Miss America Voy Forum
Best Fare Finder Avanti
Uky Linkblue Login
Costco Gas Foster City
Divina Rapsing
Craigslist Southern Oregon Coast
Puretalkusa.com/Amac
Xfinity Outage Map Fredericksburg Va
Aliciabibs
Nottingham Forest News Now
Maths Open Ref
Mawal Gameroom Download
Lawrence Ks Police Scanner
Ucm Black Board
Quality Tire Denver City Texas
In Branch Chase Atm Near Me
The Wichita Beacon from Wichita, Kansas
Watchdocumentaries Gun Mayhem 2
Pensacola Cars Craigslist
Craigslist Tulsa Ok Farm And Garden
Www.craigslist.com Waco
If You're Getting Your Nails Done, You Absolutely Need to Tip—Here's How Much
Emily Browning Fansite
Wilson Tire And Auto Service Gambrills Photos
Sherwin Source Intranet
2000 Ford F-150 for sale - Scottsdale, AZ - craigslist
786 Area Code -Get a Local Phone Number For Miami, Florida
Leslie's Pool Supply Redding California
Latest Posts
Article information

Author: Ms. Lucile Johns

Last Updated:

Views: 6127

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Ms. Lucile Johns

Birthday: 1999-11-16

Address: Suite 237 56046 Walsh Coves, West Enid, VT 46557

Phone: +59115435987187

Job: Education Supervisor

Hobby: Genealogy, Stone skipping, Skydiving, Nordic skating, Couponing, Coloring, Gardening

Introduction: My name is Ms. Lucile Johns, I am a successful, friendly, friendly, homely, adventurous, handsome, delightful person who loves writing and wants to share my knowledge and understanding with you.