Skip to content

Instantly share code, notes, and snippets.

@swannodette
Created July 9, 2010 19:32
Show Gist options
  • Save swannodette/469929 to your computer and use it in GitHub Desktop.
Save swannodette/469929 to your computer and use it in GitHub Desktop.
(ns second-post.mongo
(:use aleph)
(:use karras.core
karras.collection
karras.sugar))
(def dummy (collection (connect) :dummy :foo))
(defn my-save [request]
(future
(insert dummy {:bar "test"})
(respond! request
{:status 200
:headers {"Content-Type" "text/html"}
:body "Saved!"})))
(run-aleph my-save {:port 8080})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment