@app.route('/')
def index():
return render_template('index.html', async_mode=socketio.async_mode)
├───static
│ ├───css
│ │ style.css
│ │
│ └───js
│ script.js
│
├───templates
│ hello.html
│
│ app.py
<script src="/static/js/script.js"></script>
<script src="{{ url_for('static', filename='js/script.js') }}"></script>
from flask import Flask
# set the project root directory as the static folder, you can set others.
app = Flask(__name__, static_url_path='path/to/staic/')
<link rel="stylesheet" type="text/css" href="/static/style.css">