Mercurial > laserkard
annotate server.clj @ 71:ad52bd1a084b laserkard
Now there is no HTML whatsoever\!
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 22 Jun 2010 22:42:11 -0400 |
parents | 751fb9fd445b |
children | 874a6a2c28cf |
rev | line source |
---|---|
rlm@69 | 1 (ns laserkard.server |
rlm@70 | 2 (:use (compojure.http request servlet session routes) |
rlm@70 | 3 (compojure.server jetty) |
rlm@71 | 4 (compojure control) |
rlm@71 | 5 (laserkard buy-temp) |
rlm@71 | 6 |
rlm@71 | 7 )) |
rlm@69 | 8 |
rlm@69 | 9 (defroutes example |
rlm@71 | 10 (GET "/index.clj" [] "<h1> hello, connie, good to meet you</h1>") |
rlm@71 | 11 (GET "/buy-temp.clj" [] (buy-gen)) |
rlm@71 | 12 ) |
rlm@71 | 13 |
rlm@71 | 14 |
rlm@69 | 15 |
rlm@70 | 16 (defserver laserkard-server |
rlm@70 | 17 {:port 9000 :host "localhost"} |
rlm@70 | 18 "/*" (servlet example)) |
rlm@69 | 19 |
rlm@69 | 20 |
rlm@69 | 21 |
rlm@69 | 22 |
rlm@70 | 23 |
rlm@70 | 24 |