input: Write a function to create an API using Flask and Python that takes a list or array of integers and returns their minimum and maximum values. Use the following function definition:
  
  from flask import Flask, request
  app = Flask(__name__)
  
  @app.route('/minmax', methods=['POST'])
  def minmax():
      data = request.get_json()
      nums = data['nums']
      minVal = min(nums)
      maxVal = max(nums)
      return {'min': minVal, 'max': maxVal}
  
  if __name__ == '__main__':
      app.run()
  
  
  ### Test Cases:
  assert minmax({'nums': [12, 4, 9, 24, -5]}) == {'min': -5, 'max': 24}
  assert minmax({'nums': [0, 0, 0, 0]}) == {'min': 0, 'max': 0}
  assert minmax({'nums': [3]}) == {'min': 3, 'max': 3}
  assert minmax({'nums': [-10, -5, -8, -2]}) == {'min': -10, 'max': -2}
  assert minmax({'nums': []}) == {'min': None, 'max': None}
output: 
  def minmax():
      data = request.get_json()
      nums = data['nums']
      if nums:
          minVal = min(nums)
          maxVal = max(nums)
      else:
          minVal = None
          maxVal = None
      return {'min': minVal, 'max': maxVal}
  