split middlewares.js