npm

Need private packages and team management tools?Check out npm Orgs. »

@t2ee/vader

1.0.0 • Public • Published

IMPORTANT !!

@t2ee/vader has now moved towards 1.x versions, with branch new mechanisms (though, 99% like apis like 0.x versions). For legacy 0.x versions, please (0.x branch)[see https://github.com/t2ee/vader/tree/0.x].

Introducation

@t2ee/vader is a routing component (with JAX-RS like grammars). It is to be used with koa@2.

For detailed introduction and examples, please visit vader.t2ee.org

Installation

npm i reflect-metadata @t2ee/core @t2ee/sl4js koa@2 @t2ee/vader -S

Example

const router = Router.newInstance();
 
@Path('/')
class Controller {
 
    @GET
    @Path('/say')
    say(@QueryParam('message') message: string) {
        const response = new Response();
        response.body = message;
        return response;
    }
}
 
router.use(Controller);
const app = new Koa();
app.use(router.routes());
app.listen(8080);

install

npm i @t2ee/vader

Downloadsweekly downloads

38

version

1.0.0

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability