yada

2019-03-01T13:31:39.001900Z

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)))

2019-03-01T23:06:04.003500Z

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?

2019-03-01T23:23:35.003900Z

found the solution (yada.resources.classpath-resource/new-classpath-resource "public")

2019-03-01T23:29:08.004500Z

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.

2019-03-01T23:31:04.004700Z

maybe the problem is with Windows