view server.clj @ 106:5b0753c6f34d laserkard tip

updated to newest compojure and a simpler syntax
author Robert McIntyre <rlm@mit.edu>
date Mon, 27 Sep 2010 20:22:58 -0400
parents 874a6a2c28cf
children
line wrap: on
line source
1 (ns laserkard.server
2 (:use
3 [compojure core]
4 [ring.adapter jetty]
5 [laserkard buy-temp faq])
6 )
8 (defroutes laserkard
9 (GET "/index.clj" [] "<h1> hello, connie, good to meet you</h1>")
10 (GET "/buy-temp.clj" [] (buy-gen))
11 (GET "/faq.clj" [] (faq))
12 )
14 (defn serve []
15 (future
16 (run-jetty (var laserkard.server/laserkard) {:port 9000 :host "localhost"})))
19 ;(defserver laserkard-server
20 ; {:port 9000 :host "localhost"}
21 ; "/*" (servlet example))