A generic way of setting up a REST API for any collection of mongo documents.