clojure - Boot: serve non-root directory from classpath in handler + cljs reload -
i have tried convert leiningen project boot: https://github.com/borkdude/lein2boot.
it uses serve task serve handler. handler offers api , serves files. using reload task, want able reload javascript.
i needed place html , javascript @ root of resources directory (in example "assets"), because reload task sends changed javascript browser using full resource path (/main.js
). means have serve root of classpath: (resources "/" {:root ""})
in compojure. problem can request file entire classpath: no good.
when relocate javascript assets/public/main.js
, serve public directory: (resources "/" {:root "public"})
, file can requested @ "/main.js", reload task notifies browser reload file "/public/main.js" causes 404.
how can solve problem?
it looks being worked on in https://github.com/adzerk-oss/boot-reload/issues/18, allow :asset-path
option provide relative roots.
Comments
Post a Comment