input: Write a function that creates a basic REST API using Python and Flask to list all the countries in the world. The API should read the list of countries from a JSON file named 'data.json' and serve it as a JSON response when accessed via the route '/countries'.
  
  assert create_country_api() is not None
  assert type(create_country_api()) == type(Flask('main'))
output: 
  def create_country_api():
      from flask import Flask, jsonify
      import json
  
      app = Flask(__name__)
  
      @app.route('/countries', methods=['GET'])
      def get_countries():
          with open('data.json', 'r') as file:
              countries = json.load(file)
          return jsonify(countries)
  
      return app
  