koajs / route

Simple route middleware

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support next like express

saturngod opened this issue · comments

Is it possible to support next parameter like express.js.

Example : I want to check auth before go to dashboard

app.use(route.all('/dashboard/*', dashboard.auth));
app.use(route.get('/dashboard/', dashboard.home));

You might want to checkout koa-router

yea koa-router is more full-featured, I'll add a link to it in the readme