connect middleware for server sent events (EventSource)