Skip to content

Instantly share code, notes, and snippets.

@raek
Created September 29, 2010 18:38
Show Gist options
  • Save raek/603284 to your computer and use it in GitHub Desktop.
Save raek/603284 to your computer and use it in GitHub Desktop.
(ns se.raek.lcug.web-example
(:use [net.cgrand.moustache :only [app]]
[ring.adapter.jetty :only [run-jetty]]))
(def messages (atom ()))
(def routes
(app
[""] "hi!"
["hello"] {:get [{:status 200
:headers {"Content-Type" "text/plain"}
:body "Hello, world!"}]}
["greet" name] {:get ["Hello, " name]}))
(defonce server (run-jetty #'routes {:port 9080, :join? false}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment