Skip to content

Instantly share code, notes, and snippets.

@bhoomit
Last active December 21, 2015 04:19
Show Gist options
  • Select an option

  • Save bhoomit/6248786 to your computer and use it in GitHub Desktop.

Select an option

Save bhoomit/6248786 to your computer and use it in GitHub Desktop.
import os
from flask import Flask, redirect, request, current_app, jsonify
app = Flask(__name__)
@app.route('/', methods=['GET','POST'])
def hello():
return "Hello World"
if __name__ == '__main__':
# Bind to PORT if defined, otherwise default to 5000.
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment