Mercurial > laserkard
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.server2 (:use3 [compojure core]4 [ring.adapter jetty]5 [laserkard buy-temp faq])6 )8 (defroutes laserkard9 (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 (future16 (run-jetty (var laserkard.server/laserkard) {:port 9000 :host "localhost"})))19 ;(defserver laserkard-server20 ; {:port 9000 :host "localhost"}21 ; "/*" (servlet example))