@ark7/router
v1.0.10
Published
Ark7 Router layer framework.
Downloads
99
Readme
@ark7/router
@ark7/router
is class-oriented routing framework which is built on top of koa and koa-router.
Usage
Basic Usage
@Config({
prefix: '/users',
})
class User extends A7Controller {
@Post('/')
create = models.Users.createMiddleware({});
@Get('/')
@Permission({ roles: [Roles.ADMIN] })
find = models.Users.findMiddleware({});
@SubController('/users/:userId/topics')
topics = Topics;
}