input: Write a function to create a basic REST API using Python and Flask to list all countries in the world by reading data from a JSON file. The function should return the Flask application object. The expected behavior is described by the given test cases.
  assert create_api() is not None
  assert create_api().route == '/countries'
output: def create_api():
      from flask import Flask, jsonify
      import json
  
      app = Flask(__name__)
  
      @app.route('/countries')
      def get_countries():
          with open('countries.json', 'r') as file:
              countries = json.load(file)
          return jsonify(countries)
  
      return app