ukayani / restify-router

A router interface for restify that lets you aggregate route definitions and apply to a restify server
MIT License
52 stars 15 forks source link

Recursive router #6

Closed ukayani closed 7 years ago

ukayani commented 7 years ago

Addresses issue/enhancement #5

Usage

// routes/routes.js
router.add("/v1", require("./v1/routes"));

// routes/v1/routes.js
router.add("/auth", require("./auth"));

// routes/v1/auth.js
router.post("/register", function (req, res, next) {});

@Cyberuben @Steinweber

Please take a look at the tests under the describe block: Nested routers via .add and let me know if this fits your request.

If its good i'll merge it in. It doesn't break existing functionality.