expose connect middleware