leiningen - Compojure Example from Clojure in Action Not Working -
i working on compojure example clojure in action page 232
(ns compojure-test.core (:gen-class) (:use compojure)) (defroutes hello (get "/" (html [:h1 "hello world"])) (any "*" [404 "page not found"])) (run-server {:port 8080} "/*" (servlet hello))
but when attempt run it:
$ lein run exception in thread "main" java.lang.classnotfoundexception: compojure-test.core @ java.net.urlclassloader$1.run(urlclassloader.java:202) @ java.security.accesscontroller.doprivileged(native method) ...
it appears statement
(:use compojure)
i have heard there major change between recent versions of compojure. ma doing wrong in setting compojure app? there tutorial online me , running?
you might want try changing use
statement to:
(:use compojure.core)
that should it.
i created boilerplate template while compojure has working example can see here.
even better, if you're using leiningen - should - can create new compojure project this:
$ lein new compojure hello-world
checkout compojure's getting started more.
Comments
Post a Comment