Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated README with new example, removed obsolete sections

  • Loading branch information...
commit 9b2eadd087f85e2ca5fdc12a6d2acb38b67b859b 1 parent 493851f
James Reeves authored
Showing with 34 additions and 62 deletions.
  1. +0 −62 README.markdown
  2. +34 −0 README.md
62 README.markdown
View
@@ -1,62 +0,0 @@
-Compojure is an open source web framework for the [Clojure](http://clojure.org)
-programming language. It emphasizes a thin I/O layer and a functional approach
-to web development.
-
-Compojure is still in active development. The current stable branch has been
-released as version 0.3.1.
-
-Sample Code
------------
-
-Here's a small web application written in Compojure:
-
- (use 'compojure)
-
- (defroutes my-app
- (GET "/"
- (html [:h1 "Hello World"]))
- (ANY "*"
- (page-not-found)))
-
- (run-server {:port 8080}
- "/*" (servlet my-app))
-
-Dependencies
-------------
-
-To run Compojure, you'll need:
-
-* The [Clojure](http://clojure.org) programming language
-* The [Clojure-Contrib](http://code.google.com/p/clojure-contrib/) library
-* A Java servlet container like [Jetty](http://www.mortbay.org/jetty/)
-* Apache Commons [FileUpload](http://commons.apache.org/fileupload),
- [IO](http://commons.apache.org/io) and
- [Codec](http://commons.apache.org/codec).
-
-These dependencies can be downloaded automatically using:
-
- ant deps
-
-Documentation
--------------
-
-For information on how to get started and use Compojure, please see our
-[Wiki](http://en.wikibooks.org/wiki/Compojure).
-
-There is also a rough draft of a [Compojure Tutorial](http://groups.google.com/group/compojure/browse_thread/thread/3c507da23540da6e)
-available to read.
-
-Community
----------
-
-The [Compojure Group](http://groups.google.com/group/compojure) is the best place
-to ask questions about Compojure, suggest improvements or to report bugs.
-
-Tutorials
----------
-
-Eric Lavigne has written a series of excellent tutorials on Compojure:
-
-* [Install Compojure on a Slicehost VPS](http://ericlavigne.wordpress.com/2008/12/18/compojure-on-a-slicehost-vps/)
-* [Using PostgreSQL with Compojure](http://ericlavigne.wordpress.com/2008/12/28/using-postgresql-with-compojure/)
-* [Compojure security: authentication and authorization](http://ericlavigne.wordpress.com/2009/01/04/compojure-security-authentication-and-authorization/)
34 README.md
View
@@ -0,0 +1,34 @@
+Compojure is a small, open source web framework for the
+[Clojure](http://clojure.org) programming language.
+
+An Example
+----------
+
+Here's a small web application written using Compojure,
+[Ring](http://github.com/mmcgrana/ring) and
+[Hiccup](http://github.com/weavejester/hiccup).
+
+ (ns hello-world
+ (:use [compojure.core :only (defroutes GET ANY)]
+ [hiccup.core :only (html)]
+ [ring.adapter.jetty :only (run-jetty)]
+ [ring.util.response :only (redirect)])
+
+ (defroutes main-routes
+ (GET "/" []
+ (redirect "/world"))
+ (GET "/:name" [name]
+ (html [:h1 "Hello " name]))
+ (ANY "*" {uri :uri}
+ {:status 404
+ :body (html [:h1 "Page not found: " uri])}))
+
+ (run-jetty main-routes {:port 8080})
+
+
+Community
+---------
+
+The [Compojure Google Group](http://groups.google.com/group/compojure) is
+the best place to ask questions about Compojure, suggest improvements or to
+reportbugs.
Please sign in to comment.
Something went wrong with that request. Please try again.