O'Reilly logo

Web Development with MongoDB and Node.js by Jason Krol

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Migrating to Express v4.0.0

The biggest change that comes with Express Version 4.0 is that Connect is no longer a dependency. Additionally, most of Express's (and subsequently Connect's) bundled middleware has been stripped out and moved into individual repositories. This is to help speed up the development and release cycles for both the newly separated middleware modules as well as Express itself. The only middleware that remains is express.static (for convenience). The good news here is that we're no longer required to use Express's (and by proxy Connect's) middleware by default!

The other big change is the way routes work. In previous versions the router was a part of the middleware and the routes were all defined as app. verb (). Now, you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required