Browse files

reference links work?

  • Loading branch information...
1 parent eb1ba94 commit f2543791f883ee40452849342ec18b55e3a69d0c Heow Goodman committed Nov 6, 2011
Showing with 26 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +3 −0 README.md
  3. +8 −0 project.clj
  4. +11 −0 src/example1.clj
View
4 .gitignore
@@ -0,0 +1,4 @@
+pom.xml
+*jar
+lib
+classes
View
3 README.md
@@ -2,6 +2,8 @@
Compojure Cookies Example
=========================
+Clojure, being a relatively new language uses an even newer web framework: [Compojure][1].
+
### Foo ###
> This is a blockquote.
@@ -14,3 +16,4 @@ Compojure Cookies Example
Otherwise `["this" "is" "code"]` har har.
+[1]: https://github.com/weavejester/compojure "Compojure"
View
8 project.clj
@@ -0,0 +1,8 @@
+(defproject compojure-cookies-example "1.0.0-SNAPSHOT"
+ :main example0
+ :description "Idiomatic usage of Compojure using sessionless cookies."
+ :dependencies [[org.clojure/clojure "1.2.0"]
+ [org.clojure/clojure-contrib "1.2.0"]
+ [compojure "0.6.5"]
+ [ring/ring-jetty-adapter "0.3.9"]
+ ])
View
11 src/example1.clj
@@ -0,0 +1,11 @@
+(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")))}) )

0 comments on commit f254379

Please sign in to comment.