prepared response middleware for ExpressJS