I'm facing a challenge with including a script file in one of my html files. Despite trying various methods, the browser doesn't seem to recognize it.
After reading this solution: How to include css files into compojure project?
I decided to create a public folder within my resource directory. Here is how the structure looks like:
resources
|-public
|-views
| |-myview.html
|-scripts
|-my.script.js
The inclusion of the script file in myview.html appears as follows:
<head>
<script src="/scripts/my.script.js"></script>
</head>
Upon requesting myview.html from the server, everything loads fine except for the fact that none of the functions in my.script.js are recognized. Strangely enough, when I directly load the html in the browser (adjusting the path to the script file accordingly), it works perfectly fine. This issue persists even when accessing it through the server.
So my question is, how can I make sure that my script files (and later on, css files) can be detected by the html in a standard compojure setup?