Hacker News new | past | comments | ask | show | jobs | submit login

This might be somewhat negative, but I don't quite see what problem the library is solving.

It looks like as if Express wanted to become more like Koa (obvious from the context object). Frankly, it has missed out - koa's simplicity and elegance is unmatched. The routing and middleware syntax is particularly clunky.

Documentation seems really nice though.




No problem, didn't sound negative. The main difference with Koa would be having a starting point with default middleware, security and websockets. I do agree with your points, Koa is probably the most elegant library out there, probably followed closely only by express.

But that is not why I created server. It is not about library elegance and simplicity, it's all about making it easy to use. Both of Express and Koa involve external middleware that the user has to manage manually, and there is a subset that is really common for most situations. Server.js is all about usage simplicity, including this subset by default and making things work by default.

Context was inspired initially by the way Promises work with a single return value, but then expanded further (and named after) Koa's context.


Isn't koa flexible enough for you to build a framework on top of it to accomplish your goals of elegance and simplicity? That way you could take advantage of the ecosystem that already exists, instead of trying to bootstrap your own.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: