moved vent exposure from middleware to module.exports