-
-
Save anildigital/0fbdd70a2075db8dc17e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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