Move from expressjs to connect middleware