adding middleware to app_mongo.js