input: Write a function to create a basic REST API using Python and Flask that lists all the countries in the world. The API should have a single endpoint at '/countries' which, when accessed via a GET request, returns a JSON response containing a list of all countries. Assume that the list of countries is stored in a JSON file named 'data.json'.
  assert get_countries() == {"France": "Paris", "Germany": "Berlin", "Japan": "Tokyo"}
  assert get_countries() == {"Brazil": "Brasília", "Canada": "Ottawa", "Australia": "Canberra"}
output: 
  def get_countries():
      import json
      with open('data.json', 'r') as file:
          countries = json.load(file)
      return countries
  