#!/usr/bin/env python

import os
from flask import Flask
app = Flask(__name__)

@app.route('/')

def hello():
    return open('index.html').read()

port = os.getenv('VCAP_APP_PORT', '5000')

if __name__ == "__main__":
    app.run(host='0.0.0.0', port=int(port))

#!/usr/bin/env python

import os
from flask import Flask
app = Flask(__name__)

@app.route('/')

def hello():
    return open('index.html').read()

port = os.getenv('PORT', '5000')

if __name__ == "__main__":
    app.run(host='0.0.0.0', port=int(port))

Update environment variable name for port to listen on from VCAP_APP_PORT (deprecated) -> PORT
Update environment variable name for port to listen on from VCAP_APP_PORT (deprecated) -> PORT
