old_contents: #-------------------------------------------------------------------------------
  # Licensed to the Apache Software Foundation (ASF) under one
  # or more contributor license agreements.  See the NOTICE file
  # distributed with this work for additional information
  # regarding copyright ownership.  The ASF licenses this file
  # to you under the Apache License, Version 2.0 (the
  # "License"); you may not use this file except in compliance
  # with the License.  You may obtain a copy of the License at
  #
  # http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing,
  # software distributed under the License is distributed on an
  # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  # KIND, either express or implied.  See the License for the
  # specific language governing permissions and limitations
  # under the License.
  #
  # (c) yafra.org, 2002, Switzerland
  #
  #-------------------------------------------------------------------------------
  #
  # python eve run.py
  
  import os
  from eve import Eve
  from eve import request, jsonify
  
  # Heroku support: bind to PORT if defined, otherwise default to 5000.
  if 'PORT' in os.environ:
      port = int(os.environ.get('PORT'))
      # use '0.0.0.0' to ensure your REST API is reachable from all your
      # network (and not only your computer).
      host = '0.0.0.0'
  else:
      port = 8080
      host = '127.0.0.1'
  
  app = Eve()
  
  @app.route("/ssl")
  def SslPage():
      return jsonify(username='martin',
                         email='www@gmail.com',
                         id='test111')
  
  @app.after_request
  def after_request(response):
      response.headers.add('X-Test', 'This is only test.')
      return response
  
  if __name__ == '__main__':
      app.run(host=host, port=port)
  
new_contents: #-------------------------------------------------------------------------------
  # Licensed to the Apache Software Foundation (ASF) under one
  # or more contributor license agreements.  See the NOTICE file
  # distributed with this work for additional information
  # regarding copyright ownership.  The ASF licenses this file
  # to you under the Apache License, Version 2.0 (the
  # "License"); you may not use this file except in compliance
  # with the License.  You may obtain a copy of the License at
  #
  # http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing,
  # software distributed under the License is distributed on an
  # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  # KIND, either express or implied.  See the License for the
  # specific language governing permissions and limitations
  # under the License.
  #
  # (c) yafra.org, 2002, Switzerland
  #
  #-------------------------------------------------------------------------------
  #
  # python eve run.py
  
  import os
  from eve import Eve
  from flask import jsonify
  
  # Heroku support: bind to PORT if defined, otherwise default to 5000.
  if 'PORT' in os.environ:
      port = int(os.environ.get('PORT'))
      # use '0.0.0.0' to ensure your REST API is reachable from all your
      # network (and not only your computer).
      host = '0.0.0.0'
  else:
      port = 8080
      host = '0.0.0.0'
  
  app = Eve()
  
  @app.route("/ssl")
  def SslPage():
      return jsonify(username='martin',
                         email='www@gmail.com',
                         id='test111')
  
  @app.after_request
  def after_request(response):
      response.headers.add('X-Test', 'This is only test.')
      return response
  
  if __name__ == '__main__':
      app.run(host=host, port=port)
  
subject: change to listen to all ip's and added a non eve handler based on flask