I followed the instructions from How to serve static files in Flask, but still couldn\'t get it working.
Here\'s my project structure:
Project_path
for me this one worked :
@app.route('/static/')
def serve_static(filename):
root_dir = os.path.dirname(os.getcwd())
return send_from_directory(os.path.join(root_dir, 'static', 'js'), filename)
beside adding this script into init
app._static_folder = os.path.abspath("static/")
app = Flask(__name__)
into __init__.py