input: Write a function to design a web server in Python using the Flask framework that serves a JSON object containing the current temperature for a city based on the city name given in the request. The function should return the Flask application object.
  
  from flask import Flask, request
  import requests
  import json
  
  def create_weather_server():
      app = Flask(__name__)
  
      @app.route('/getTemp', methods=['POST'])
      def get_temp():
          city = request.json['city']
          url = 'http://api.openweathermap.org/data/2.5/weather?q={}&APPID=xxxxxx'
          r = requests.get(url.format(city))
          weather = json.loads(r.text)
          return {'temperature': weather['main']['temp']}
  
      return app
  
  assert create_weather_server().name == '__main__'
  assert create_weather_server().debug == True
output: def create_weather_server():
      app = Flask(__name__)
  
      @app.route('/getTemp', methods=['POST'])
      def get_temp():
          city = request.json['city']
          url = 'http://api.openweathermap.org/data/2.5/weather?q={}&APPID=xxxxxx'
          r = requests.get(url.format(city))
          weather = json.loads(r.text)
          return {'temperature': weather['main']['temp']}
  
      return app