connect middleware for hyperjson support