This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-03-01
Channels
- # announcements (4)
- # aws (1)
- # beginners (172)
- # cider (16)
- # cljdoc (63)
- # cljsrn (7)
- # clojure (150)
- # clojure-dev (8)
- # clojure-europe (26)
- # clojure-gamedev (6)
- # clojure-greece (23)
- # clojure-nl (4)
- # clojure-spec (10)
- # clojure-uk (101)
- # clojurescript (40)
- # community-development (5)
- # cursive (19)
- # datomic (54)
- # emacs (39)
- # figwheel-main (5)
- # fulcro (4)
- # graphql (16)
- # immutant (5)
- # jobs (8)
- # jobs-rus (1)
- # leiningen (1)
- # off-topic (31)
- # planck (1)
- # re-frame (7)
- # reagent (8)
- # reitit (6)
- # remote-jobs (4)
- # shadow-cljs (11)
- # spacemacs (18)
- # specter (2)
- # sql (58)
- # vim (2)
- # yada (5)
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 (
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