Created
September 26, 2021 09:31
-
-
Save RajputVaibhav/a8e909dcc68bca8ca75e41f8818222fe to your computer and use it in GitHub Desktop.
Used in medium blog on devspace
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
from flask import Flask, send_from_directory, Response | |
from flask_cors import CORS | |
app = Flask(__name__) | |
CORS(app) | |
@app.route('/healthcheck') | |
def healthcheck(): | |
return Response(status=200) | |
@app.route('/file') | |
def sendfile(): | |
return send_from_directory('static','index.html') | |
if __name__ == '__main__': | |
app.run(host='0.0.0.0', port=5050) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment