Export middleware via index.js.