added function for creating connect middleware.
0.0.2