koajs / joi-router

Configurable, input and output validated routing for koa
MIT License
450 stars 96 forks source link

can I specify base url to router? #1

Closed zhaoyao91 closed 9 years ago

zhaoyao91 commented 9 years ago

this router is cool, but i want to add base url to the router so i can use it like this:

var pub = routuer({baseUrl:'/test'}); pub.post('/wow', ...);

then url '/test/wow' can be visited

can this be possible by some ways?

3q

reyawn commented 9 years ago

Check out koa-resourcer, it uses koa-joi-router behind-the-scenes and provides a framework for "mounting" on paths.