Created
November 23, 2020 16:38
-
-
Save nithyadurai87/1f68117044c66fc3a5b36159a4bba7fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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