Skip to content

Instantly share code, notes, and snippets.

Created May 20, 2011 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/982438 to your computer and use it in GitHub Desktop.
Save anonymous/982438 to your computer and use it in GitHub Desktop.
compojure
lein clean
lein deps
lein ring server
Exception in thread "main" java.lang.ClassNotFoundException: compojure.core (core.clj:2)
project.clj:
(defproject hello-www2 "1.0.0-SNAPSHOT"
:description "compojue ex"
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/clojure-contrib "1.2.0"]
[compojure "0.6.2"]]
:dev-dependencies [[lein-ring "0.4.0"]]
:ring {:handler hello-www2.core/app}
)
core.clj:
(ns hello-www2.core)
(:use compojure.core)
(:require [compojure.route :as route]
[compojure.handler :as handler]))
(defroutes main-routes
(GET "/" [] "<h1>Hello World Wide Web!</h1>")
(route/resources "/")
(route/not-found "Page not found"))
(def app
(handler/site main-routes))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment