Moving boilerplate middleware out of boilerplate routes