Drive by review here and @cadecairos will be your primary reviewer here, but consider doing something like....

`app.get( "/metrics/:type/:filter", routes.metrics );`

That way your routes can just have some object that knows how to deal with functions for each type, reducing the

```javascript

if () {
  // Stuff
} else if () {
  // Stuff
}

```

logic you have in your current code. Makes it cleaner and easier to follow. Also less code.