serverMiddleware: [{ path: '/', handler: './serverMiddleware.js' }]
export default (req, res, next) => { // detect urls you'd like to redirect // call res.redirect(CODE, NEWURL) if (req.url === '/old-page/') { res.writeHead(301, { Location: 'new-page' }); res.end(); } else { next(); } }