hi, I am trying to get working server reloading with yada and mount whenever code changes. I am using yada listener example from user guide:
(defn create-server []
(yada/listener
["/"
[["" (yada/as-resource "Root")]
["hello" (yada/as-resource "Goodbye World!")]
["test" (yada/resource {:produces "text/plain"
:response "This is a test!"})]
[true (yada/as-resource nil)]]]
{:port port}))
(mount/defstate
server
:start (create-server)
:stop ((:close server)))
if I want to serve html together with js and css files for a given route path, I tried to use (yada/as-resource (<http://clojure.java.io/resource|clojure.java.io/resource> "index.html"))
but it does not loads subresources. What is the easiest way to load them as well?
found the solution (yada.resources.classpath-resource/new-classpath-resource "public")
but this
(yada.resources.classpath-resource/new-classpath-resource
"public" {:index-files ["index.html"]})
does not seem to work for localhost:3000, I get 405.maybe the problem is with Windows