input: Write a function to create a basic REST API using Python and Flask to list all the countries in the world, given a JSON file named 'data.json' containing the list of countries. The function should return the API as a Flask application.
  assert get_countries_api()==<Flask 'app'>
output: from flask import Flask, jsonify
  import json
  
  def get_countries_api():
      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