Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save arpitbbhayani/4a66909b57ecc9eb6807f327b62cb51e to your computer and use it in GitHub Desktop.
Save arpitbbhayani/4a66909b57ecc9eb6807f327b62cb51e to your computer and use it in GitHub Desktop.
Serve static files only from Flask
# Hangman UI
#
# Installing required packages
# $ pip install flask
#
# Run
# $ python ui.py
#
from flask import Flask
app = Flask(__name__, static_url_path='/')
@app.route('/')
def index():
return app.send_static_file('./index.html')
app.run(host="0.0.0.0", port=3000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment