Creating `res.locals` for middleware