Skip to content

Instantly share code, notes, and snippets.

@mccraigmccraig
Created March 21, 2018 23:08
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 mccraigmccraig/fee0055f7c492cf363e37a14170c2b22 to your computer and use it in GitHub Desktop.
Save mccraigmccraig/fee0055f7c492cf363e37a14170c2b22 to your computer and use it in GitHub Desktop.
(defn create-aleph-server [{:keys [handler server-opts]}]
(info "Starting web server with opts " server-opts)
(let [server (http/start-server (some-fn handler
(constantly {:status 404
:body "Not found"}))
server-opts)]
(info "Started web server.")
[server (fn [] (.close server))]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment