You can add
<script src="{{ url_for('static', filename='scripts/index.js') }}"></script> to your html template file, also be good to: app = Flask(__name__, template_folder="templates", static_folder="static") that is it :)