Skip to content

Commit

Permalink
reference links work?
Browse files Browse the repository at this point in the history
  • Loading branch information
Heow Goodman committed Nov 7, 2011
1 parent eb1ba94 commit f254379
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
pom.xml
*jar
lib
classes
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -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.
Expand All @@ -14,3 +16,4 @@ Compojure Cookies Example

Otherwise `["this" "is" "code"]` har har.

[1]: https://github.com/weavejester/compojure "Compojure"
8 changes: 8 additions & 0 deletions 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"]
])
11 changes: 11 additions & 0 deletions 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.