Skip to content

Instantly share code, notes, and snippets.

@chbaranowski
Created August 14, 2010 15:11
Show Gist options
  • Save chbaranowski/524386 to your computer and use it in GitHub Desktop.
Save chbaranowski/524386 to your computer and use it in GitHub Desktop.
(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