koa-lite/docs/faq.md

28 lines
984 B
Markdown
Raw Normal View History

2013-08-21 05:07:00 +00:00
# Frequently Asked Questions
## Does Koa replace Express?
2013-12-19 06:54:56 +00:00
It's more like Connect, but a lot of the Express goodies
were moved to the middleware level in Koa to help form
a stronger foundation. This makes middleware more enjoyable
2013-12-19 07:08:50 +00:00
and less error-prone to write, for the entire stack, not
just the end application code.
Typically many middleware would
2013-12-19 07:08:14 +00:00
re-implement similar features, or even worse incorrectly implement them,
when features like signed cookie secrets among others are typically application-specific,
not middleware specific.
2013-08-21 05:07:00 +00:00
## Does Koa replace Connect?
No, just a different take on similar functionality
now that generators allow us to write code with less
2013-12-19 06:54:56 +00:00
callbacks. Connect is equally capable, and some may still prefer it,
it's up to what you prefer.
2013-12-19 07:03:11 +00:00
## Do Generators Decrease Performance?
Barely - check out the benchmarks in our readme, the numbers
are more than fine, and there's no substition for proper
horizontal scaling.