Are you participating in our Music Hackathon?
katyadee (1127)

Are you making something? 🤔How's it going? What have the challenges been so far?

You are viewing a single comment. View All
ryanlague (4)

It is going very well except I have been monumentally stuck with a certain thing...

Using Flask, I seem to be unable to contain my JS in a separate file!
I have successfully contained my CSS in static files, but the JS just isn't being picked up!

Is this a known issue? I'm very new to JS and web stuff in general... It could very well be me!

I am trying to store my JS in:

and then use:

<script src="{{ url_for('static', filename='/scripts/audio.js') }}" </script>

Loading the page gives me no errors, I even get a 200: - - [09/Jul/2019 02:12:03] "GET /root/runner/static/scripts/audio.js HTTP/1.1" 200 -

But then none of the functions work at all.
When I transfer all the JS into my index.html file, it works like a charm!
Thanks for hosting such an awesome competition!

ShadowCypher (29)

@ryanlague So I just discovered this post but it might be because you have a slash in front of scripts (so it should be <script src="{{ url_for('static', filename='scripts/audio.js') }}" </script>)