Move config to `index.js` for unit-tested middlewares