Skip to content

Instantly share code, notes, and snippets.

@ztellman
Last active August 29, 2015 13:56
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 ztellman/9225543 to your computer and use it in GitHub Desktop.
Save ztellman/9225543 to your computer and use it in GitHub Desktop.
(def b (->> "a-file"
java.io.File.
java.io.FileInputStream.
aleph.formats/bytes->byte-array))
(use 'aleph.http)
(def s
(start-http-server
(wrap-ring-handler
(constantly
{:status 200
:body b}))
{:port 8080}))
;; `curl localhost:8080 > /dev/null` is quite speedy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment