How to get list of all routes I am using in restify server

I have a app designed as follows;

//server.js =====================================================
var restify = require('restify'),
    route1 = require('./routes/route1),
    route2 = require('./routes/route2),
    ....
    ....
    ....

var server = restify.createServer({
    name: 'xyz_server'
  });

route1(server);
route2(server);

Now each route file looks like belwo

   //route1.js =====================================================

   module.exports = function(server) {
      server.get('/someRoute',function(req,res,next){
                //.. do something
        });
      server.get('/anotherRoute',function(req,res,next){
                 //..something else
       });

   }; 

Now the issue is tht we have dozen's of route files and hundreds of routes in total. There are multiple developers working on this project and several routes are being added daily.

Is there a function in restify gives me a list of all routes in the system ?

What i am looking for is something like:

server.listAllRoutes();

Is anyone aware of this ?

Try something like this

function listAllRoutes(server){
  console.log('GET paths:');
  server.router.routes.GET.forEach(
    function(value){console.log(value.spec.path);}
    );
  console.log('PUT paths:');
  server.router.routes.PUT.forEach(
    function(value){console.log(value.spec.path);}
    );
}

listAllRoutes(server);

This should list all GET and PUT paths, adding POST and DELETE should be easy :)