Generic Mongo-backed REST server