I'm using catnip/leiningen in an attempt to learn Clojure... So I have a simple website and now I'd like to add a clojure-script in my page.
So I took a simple example but now got stuck on how to access my script from my site.
My project.clj
(defproject hello-world "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:dependencies [[org.clojure/clojure "1.4.0"]
[compojure "1.1.5"]
[hiccup "1.0.2"]]
:plugins [[lein-ring "0.8.2"]]
:cljsbuild {:builds
[{:source-path "src"
:compiler
{:output-to "resources/public/cljs/main.js"
:output-dir "resources/public/cljs"
:optimizations :simple
:pretty-print true}}]}
:ring {:handler hello-world.handler/app}
:profiles
{:dev {:dependencies [[ring-mock "0.1.3"]]}})
Relevant part of handler.clj
(defn header [title]
(html
[:head
[:title title]
[:script "/cljs/play.js"]]))
If I run lein ring server there are nothing at http://localhost:8080/resources/public/cljs/main.js. How to map the requests for js so that my site can find them?