Added mongodb middleware.