connect middleware server