Permalink
Newer
Older
100644 17 lines (13 sloc) 440 Bytes
68e08fb @mmcgrana Initial import from http://github.com/mmcgrana/clj-garden
authored Jan 12, 2009
1 ; A very simple Ring application.
2
cbeebac @mmcgrana Initial refactor towards 0.1.
authored Jul 11, 2009
3 (ns ring.example.hello-world
4 (:use ring.adapter.jetty)
c68558e @mmcgrana Clean up for announce
authored Jan 13, 2009
5 (:import java.util.Date java.text.SimpleDateFormat))
68e08fb @mmcgrana Initial import from http://github.com/mmcgrana/clj-garden
authored Jan 12, 2009
6
7 (defn app
8 [req]
9 {:status 200
10 :headers {"Content-Type" "text/html"}
11 :body (str "<h3>Hello World from Ring</h3>"
cbeebac @mmcgrana Initial refactor towards 0.1.
authored Jul 11, 2009
12 "<p>The current time is "
f2f4229 @mmcgrana Doc and example tweaks.
authored Feb 23, 2010
13 (.format (SimpleDateFormat. "HH:mm:ss") (Date.))
14 ".</p>")})
68e08fb @mmcgrana Initial import from http://github.com/mmcgrana/clj-garden
authored Jan 12, 2009
15
cbeebac @mmcgrana Initial refactor towards 0.1.
authored Jul 11, 2009
16 (run-jetty app {:port 8080})