title: prometheus is not able to access metrics from localhost
body: <p>I have been trying to configure prometheus to show metrics in grafana for my nodejs application. For metrics, I am using prom-client. However, on localhost I get always following error: </p>
  
  <pre><code>Get http://localhost:5000/metrics: dial tcp 127.0.0.1:5000: connect: connection refused
  </code></pre>
  
  <p>Moreover, if I use a local tunneling service, such as ngrok, it will be able to read the metrics. What am I missing ? I need to add some special config somewhere ?</p>
  
  <p>This is my prometheus.yml file:</p>
  
  <pre><code>global:
      scrape_interval: 5s
      external_labels:
          monitor: 'my-monitor'
  scrape_configs:
      - job_name: 'prometheus'
        static_configs:
                 - targets: ['localhost:9090']
      - job_name: 'my-app'
        static_configs:
                 - targets: ['localhost:5000']
  </code></pre>
  
  <p>I am running the default prometheus image with docker-compose, same for grafana.</p>