-
-
Save anildigital/2de18198a0f203135174 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 | |
(:use ring.adapter.jetty) | |
(:use ring.middleware.resource) | |
(:use ring.middleware.file) | |
(:use ring.middleware.file-info)) | |
(defn handler [request] | |
{:status 200 | |
:headers {"Content-Type" "text/plain"} | |
:body "Hello Another World"}) | |
(def root (str (System/getProperty "user.dir") "/output")) | |
;; wrap the handler, to be able to add middleware etc | |
(def app (-> #'handler (wrap-resource root ))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment