0.0.5 • Published 4 years ago

egg-route-decorators v0.0.5

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

Usage

controller

import { Prefix, RequestMethods, Path } from 'egg-route-decorators';

@Prefix('/user')
export default class UserController extends Controller {
    @RequestMethods(['GET', 'POST'])
    @Path('/example')
    public index() {
        const { ctx } = this;
        ctx.body = { msg: 'success' };
    }
}

router

import { RouteLoader } from 'egg-route-decorators';
export default ()=>{
    RouteLoader(app, '/api/v1');
}
0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago