I have a website I am currently working on in clojure. The local version of the site works perfectly, but when I push it to heroku, it is unable to find any of my static resources. I've checked, and git is including the resources/public folder, so it should be getting uploaded to heroku.
Here is my handler code:
(defroutes app
(GET "/" [] (layout/application "Home" (content/index)))
(GET "/commission" [] (layout/application "Commission Calculator" (content/commissionForm)))
(POST "/commission" [report] (layout/application "Commission Calculator" (content/commissionResults report)))
(route/resources "/"))
The resources directory is at the same level as the src folder, and the assets are named correctly. The project is located here.
Navigating directly to https://lit-falls-39572.herokuapp.com/css/master.css, results in a 404 error, but navigating to localhost:5000/css/master.css correctly returns the css content, when I host the site locally. (Navigating to either /resources/public/css/master.css or /public/css/master.css does not work either) Does anyone have any idea why it would be behaving differently on heroku?
Edit: Here is the project stucture:
├───.idea
│ ├───copyright
│ ├───inspectionProfiles
│ └───libraries
├───dev-resources
├───lib
├───resources
│ └───public
│ ├───CSS
│ ├───images
│ │ └───home
│ └───material-design
│ ├───css
│ ├───img
│ │ ├───examples
│ │ └───flags
│ ├───js
│ └───sass
│ └───material-kit
│ └───plugins
├───src
│ └───kandj
│ └───views
├───target
│ ├───classes
│ │ └───META-INF
│ │ └───maven
│ │ └───kandj
│ │ └───kandj
│ └───stale
└───test
The issue is that your CSS
directory has upper case name while your URLs use css
lower case.