I\'ve created a simple little route parsing function so that I can keep my code clean and easily maintainable, this is the little function that gets ran when the app starts
You need to send the params as an array, like this:
app[method.toLowerCase()].apply(this, [path, fn]);
If you want to send an arguments list you need to use call:
app[method.toLowerCase()].call(this, path, fn);
Source: call, apply