3 ms·
It's simple. Everyone has switched to either Koa (designed by the team behind Express) or, more likely, a client-side framework like React.
by applecore 11y ago
It's simple. Everyone has switched to either Koa (designed by the team behind Express) or, more likely, a client-side framework like React.
- pori 11y agoI'm not sure if everyone is switching over to Koa. It doesn't seem like it's on too many people's radar. That said, the most hardcore developers I know (including myself) do love and use it. At least, it looks that way here on the East Coast where everyone is still focusing on hiring for Express apps. All that said, Koa is pretty great and teams should adopt it.
- pluma 11y agoI use express because it is the most barebones solution before vanilla http/https. The middleware API is trivial and relatively agnostic (most just expect node-style req/res objects and a `next(err?)` callback). The router does what it is supposed to and allows nesting. However I would likely chose something different if my needs were different. If I wanted to implement REST APIs in Node I would use Hapi. If I wanted to build more complex web apps I might look into Koa (although I don't think I'll ever move back to classic server-only rendered apps). Express is my JS equivalent of Ruby's Sinatra and Python's Flask. Nothing more, nothing less. Addendum: I wouldn't say "everyone" has switched to Koa. Koa was handicapped by its conceptual overhead for most ordinary express users in its early days (relying on a combination of generators and promises -- both not yet sufficiently widely established and understood technologies at the time -- to build coroutines, which even fewer people understood). It has improved and the JS community seems to have caught up (just look what's going on with the Redux ecosystem -- "thunks" and "sagas" (essentially built around coroutines) are beginning to see some traction). But it didn't initially deliver the same "read this tutorial, start building apps" experience express had.
- nacs 11y ago> Everyone has switched 4 Million downloads per month for Express [1] (vs 60K/mo for Koa [2]) .. doesn't look like everyone is switching. [1]: http://npm-stat.com/charts.html?package=express&author=&from=&to= http://npm-stat.com/charts.html?package=express&author=&from... [2]: http://npm-stat.com/charts.html?package=koa&author=&from=2014-01-17&to=2016-01-17 http://npm-stat.com/charts.html?package=koa&author=&from=201...