Skip to content

Instantly share code, notes, and snippets.

@nithyadurai87
Created November 23, 2020 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nithyadurai87/1f68117044c66fc3a5b36159a4bba7fc to your computer and use it in GitHub Desktop.
Save nithyadurai87/1f68117044c66fc3a5b36159a4bba7fc to your computer and use it in GitHub Desktop.
import os
from flask import Flask
app = Flask(__name__)
port = int(os.getenv('PORT', 5500))
@app.route('/')
def home():
return render_template('index.html')
@app.route('/api/sample', methods=['GET'])
def smp():
return "Hello World"
if __name__ == '__main__':
app.run(host='0.0.0.0', port=port, debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment