Connect.js middleware for easily routing JSON API calls to appropriate JavaScript objects