Mercurial > laserkard
diff server.clj @ 70:751fb9fd445b laserkard
finally got a lisp server yay
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 22 Jun 2010 20:15:19 -0400 |
parents | dd97a10c782e |
children | ad52bd1a084b |
line wrap: on
line diff
1.1 --- a/server.clj Tue Jun 22 13:37:30 2010 -0400 1.2 +++ b/server.clj Tue Jun 22 20:15:19 2010 -0400 1.3 @@ -1,15 +1,17 @@ 1.4 (ns laserkard.server 1.5 - (:use compojure.core 1.6 - ring.adapter.jetty) 1.7 - (:require [compojure.route :as route])) 1.8 + (:use (compojure.http request servlet session routes) 1.9 + (compojure.server jetty) 1.10 + (compojure control))) 1.11 1.12 (defroutes example 1.13 - (GET "/index.clj" [] "<h1>Hello World Wide Web!</h1>") 1.14 - (route/not-found "Page not found")) 1.15 + (GET "/index.clj" [] "<h1> hello, connie, good to meet you</h1>")) 1.16 1.17 -(defn serve [] 1.18 - (run-jetty example {:port 9000})) 1.19 +(defserver laserkard-server 1.20 + {:port 9000 :host "localhost"} 1.21 + "/*" (servlet example)) 1.22 1.23 1.24 1.25 1.26 + 1.27 +