use window.location.port as Elasticsearch port with 9200 as fallback