Skip to content

Instantly share code, notes, and snippets.

@anildigital
Created January 4, 2014 14:49
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 anildigital/0fbdd70a2075db8dc17e to your computer and use it in GitHub Desktop.
Save anildigital/0fbdd70a2075db8dc17e to your computer and use it in GitHub Desktop.
(ns clojurebyexample.core)
(ns static-files.handler
(:use compojure.core)
(:require [compojure.handler :as handler]
[compojure.route :as route]))
(def root (str (System/getProperty "user.dir") "/output"))
(defroutes app-routes
(GET "/" [] "Hello World")
(route/files "/" (do (println root) {:root root}))
(route/resources "/")
(route/not-found "Not Found"))
(def app
(handler/site app-routes))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment