Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

testing code

  • Loading branch information...
commit 66f32d6171e6adf2afdba03a3babbfce8979b0bc 1 parent f254379
@heow authored
Showing with 31 additions and 4 deletions.
  1. +31 −4 README.md
View
35 README.md
@@ -1,10 +1,32 @@
-Compojure Cookies Example
-=========================
+Compojure Cookies Example 2011
+==============================
+
+Clojure, being a relatively new language, uses an even newer web framework: [Compojure][1].
+
+Compojure, still sporting a sub 1.0 version, being under active development and reduced to a thin veneer over [Ring][2] may prove challenging for developers. If for any reason is because many examples and tutorials are simply outdated.
+
+It's my goal to demonstrate the use of sessionless cookies in Compojure, with working examples.
+
+### The Basics ###
+
+[Example 1][3] is a simple hello-world application (suitable for running on [Heroku][4])
+
+```clojure
+(ns example1
+ (:use [ring.adapter.jetty :only [run-jetty]]
+ [compojure.core :only [defroutes GET]]))
+
+(defroutes routes
+ (GET "/" [] "Hi there"))
+
+(defn -main []
+ (run-jetty routes {:port (if (nil? (System/getenv "PORT"))
+ 8000 ; localhost or heroku?
+ (Integer/parseInt (System/getenv "PORT")))}) )
+```
-Clojure, being a relatively new language uses an even newer web framework: [Compojure][1].
-### Foo ###
> This is a blockquote.
>
@@ -16,4 +38,9 @@ Clojure, being a relatively new language uses an even newer web framework: [Comp
Otherwise `["this" "is" "code"]` har har.
+
+
[1]: https://github.com/weavejester/compojure "Compojure"
+[2]: http://github.com/mmcgrana/ring "Ring"
+[3]: https://github.com/heow/compojure-cookies-example/blob/master/src/example1.clj "Example 1"
+[4]: http://devcenter.heroku.com/articles/clojure "Getting Started with Clojure on Heroku/Cedar"
Please sign in to comment.
Something went wrong with that request. Please try again.