saskodh / framework

Lightweight web framework for NodeJS inspired by Spring framework
26 stars 5 forks source link

Enable @RequestMapping to be used on @Controller classes #26

Closed saskodh closed 8 years ago

saskodh commented 8 years ago

Enable @RequestMapping to be used on @Controller classes for prefixing the controller endpoints. Example:

@RequestMapping({ path: '/v2' })
@Controller()
class V2Controller {

    // Maps endpoint to '/v2/get-stg'
    @RequestMapping({ path: 'get-stg', method: RequestMethod.GET })
    async getStg() { ... }
}