Wrapup middleware for express.