I just started working with docker-compose and am stuck in communication between the two services.

I have 2 services: angular and json. I want to get some data from json to angular app. As far as I understood, services should be able to reach each other by using the servicename as hostname.

Unfortunately, angular cant reach json on <http://json-server:3000>.

What am doing wrong? Is it even possible to make http requests between services?

This is my docker-compose.yml file:

```
version: '3'
services:
  json-server:
    image: json-server-image:latest
    ports:
      - "3000:3000"
    container_name: json-server
    hostname: json-server
  angular:
    image: angular-image:latest
    ports:
      - "8888:80"
    links:
      - json-server
    container_name: angular

```