Skip to content

Instantly share code, notes, and snippets.

@swannodette
Created July 10, 2010 01:58
Show Gist options
  • Save swannodette/470350 to your computer and use it in GitHub Desktop.
Save swannodette/470350 to your computer and use it in GitHub Desktop.
(ns second-post.memory
(:use aleph))
(def db (atom []))
(defn save [request]
(future
(swap! db conj {:bar "test"})
(respond! request
{:status 200
:headers {"Content-Type" "text/html"}
:body "Saved!"})))
(run-aleph save {:port 8080})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment