Created
August 14, 2010 15:11
-
-
Save chbaranowski/524386 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns helloworld-webapp.core | |
(:use compojure.core ring.adapter.jetty) | |
(:require [compojure.route :as route]) | |
) | |
(defroutes example | |
(POST "/" [message] (str "The message was : " message)) | |
(GET "/" [] "<form method=\"post\"> | |
Message: </br> | |
<input type=\"text\" name=\"message\" value=\"\" /> | |
<input type=\"submit\" name=\"button\" value=\"send\"> | |
</form>" | |
) | |
(route/not-found "Page not found") | |
) | |
(run-jetty example {:port 8080}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment