Provide a connect middleware

cf. tal-vision's project.