koajs / joi-router

Configurable, input and output validated routing for koa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README.md Example Code Not Functional

torinberger opened this issue · comments

I don't know if this is intentional but the example usage in the README.md on the master branch does not make sense, nor does it run.

Sorry if I misunderstood what was meant to be demonstrated.

i think it's because at the end it should be :

const app = koa();
app.use(pub.middleware());
app.use(admin.middleware());
app.use(auth.middleware());
app.listen();

// instead of 

const app = koa();
koa.use(pub.middleware());
koa.use(admin.middleware());
koa.use(auth.middleware());
app.listen();