Moved location of middleware.js