Skip to content
Permalink
f2f4229
Feb 23, 2010
|
; A very simple Ring application. |
|
|
|
(ns ring.example.hello-world |
|
(:use ring.adapter.jetty) |
|
(:import java.util.Date java.text.SimpleDateFormat)) |
|
|
|
(defn app |
|
[req] |
|
{:status 200 |
|
:headers {"Content-Type" "text/html"} |
|
:body (str "<h3>Hello World from Ring</h3>" |
|
"<p>The current time is " |
|
(.format (SimpleDateFormat. "HH:mm:ss") (Date.)) |
|
".</p>")}) |
|
|
|
(run-jetty app {:port 8080}) |
You can't perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.