Skip to content

Instantly share code, notes, and snippets.

@RajputVaibhav
Created September 26, 2021 09:31
Show Gist options
  • Save RajputVaibhav/a8e909dcc68bca8ca75e41f8818222fe to your computer and use it in GitHub Desktop.
Save RajputVaibhav/a8e909dcc68bca8ca75e41f8818222fe to your computer and use it in GitHub Desktop.
Used in medium blog on devspace
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