An experiment in creating a generic API router in node.js