Created
September 11, 2017 04:17
-
-
Save c0debrain/928d2e913cdd9332559388dd4def3c67 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
from flask import Flask, request, send_from_directory | |
# set the project root directory as the static folder, you can set others. | |
app = Flask(__name__, static_url_path='') | |
@app.route('/<path:path>') | |
def send_js(path): | |
return send_from_directory('', path) | |
@app.route('/') | |
def index(): | |
return send_from_directory('','index.html') | |
@app.route("/hello") | |
def hello(): | |
return "Hello World!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment