Created
July 18, 2019 15:00
-
-
Save arpitbbhayani/4a66909b57ecc9eb6807f327b62cb51e to your computer and use it in GitHub Desktop.
Serve static files only from Flask
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
# 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