koajs / discussions

KoaJS Discussions
2 stars 2 forks source link

Mention koa-router & friends #25

Open andywer opened 7 years ago

andywer commented 7 years ago

Hi there!

I like koa and its paradigms, but as a used-to-express user I was severely wondering how it's possible that there is no app.get() or app.post(). I then realized that I need koa-router for that.

Unfortunately the website / readme doesn't mention koa-router or other important middlewares like koa-body at all. Even grepping for "router" did not yield a single match.

Would be quite helpful for newbies to link to the most popular middlewares in a prominent place 😉

fl0w commented 7 years ago

There's https://github.com/koajs/koa/wiki

saadq commented 7 years ago

Yeah, there's no mention of a router, but it does have a section with links that includes the wiki:

screen shot 2017-08-17 at 12 41 49 pm

and the main app.use section on the website also has a link to the middleware part of the wiki:

screen shot 2017-08-17 at 12 42 06 pm
andywer commented 7 years ago

See, my problem was not that it is not documented, but that is a quite necessary thing to do anything usable and it was pretty hard to find. I like the modularity approach, but it would help a lot to have a few suggestions of important middlewares in a prominent place :)

usmandap commented 7 years ago

@andywer You are right brother I also face the same thing that there is nothing mention in there docs for the routing. That's why I had updated their Koa vs Express doc file and mentioned that there is third party library support available for handling routing. Check this doc in the last I had added a section "Koa routing (third party libraries support)". https://github.com/koajs/koa/blob/master/docs/koa-vs-express.md

jonathanong commented 6 years ago

my preferred solution would be to create a wiki of "recommended" middleware to get your app running, then linking to that in the official docs. the official docs, however, should remain minimal

odinho commented 6 years ago

Yes, that would be most useful. The wiki list has way too many items and no way to meaningfully add one, I'd like to just have a set of recommended (conservative) middleware without having to investigate them all individually.

Having gone through some of the projects on the wiki list, some are abandoned, some feel abandoned, some personal projects, some are unclear on the Koa 2 support etc. Koa 2 is a breath of fresh air with regards to the basic API, but it'd be nice with a pointer to some 'this goes great with' batteries.

jonathanong commented 6 years ago

a link here would be great on the docs https://github.com/koajs/koa/wiki#routing-and-mounting

if there are any middleware that are no longer maintained, please open an issue in that repo. if they don't answer, feel free to remove it from the wiki!