📜  烧瓶服务器 js 从文件夹返回 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:41.788000             🧑  作者: Mango

代码示例1
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('/js/')
def send_js(path):
    return send_from_directory('js', path)

if __name__ == "__main__":
    app.run()