Skip to content

Instantly share code, notes, and snippets.

@miaoski
Created March 11, 2015 08:31
Show Gist options
  • Save miaoski/4ef2fcd1fa1d5632900c to your computer and use it in GitHub Desktop.
Save miaoski/4ef2fcd1fa1d5632900c to your computer and use it in GitHub Desktop.

Revisions

  1. miaoski created this gist Mar 11, 2015.
    11 changes: 11 additions & 0 deletions fileserv.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    from flask import Flask, request, send_from_directory

    # set the project root directory as the static folder, you can set others.
    app = Flask(__name__)

    @app.route('/<path:path>')
    def send_js(path):
    return send_from_directory('/Users/philippe/iso/', path)

    if __name__ == "__main__":
    app.run(host = '0.0.0.0', port = 8888, debug = True, threaded=True)