Skip to content

Instantly share code, notes, and snippets.

@anildigital
Created January 4, 2014 16:13
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/352cf0a463420ea167fb to your computer and use it in GitHub Desktop.
Save anildigital/352cf0a463420ea167fb to your computer and use it in GitHub Desktop.
(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"})
;; wrap the handler, to be able to add middleware etc
(def app (-> #'handler (wrap-resource "." )))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment