Permalink
Browse files

Removed example directory

A better place for examples would be linked from the wiki.
  • Loading branch information...
1 parent e965929 commit c8089a886e6d14c7d57f14694c84b664f0ea82b9 @weavejester weavejester committed Mar 3, 2012
Showing with 0 additions and 62 deletions.
  1. +0 −2 README.md
  2. +0 −16 example/hello_world.clj
  3. +0 −21 example/linted.clj
  4. BIN example/public/clojure.png
  5. +0 −23 example/wrapping.clj
View
2 README.md
@@ -42,5 +42,3 @@ thanks to those communities for their work.
## License
Copyright (c) 2009-2012 Mark McGranaghan and released under an MIT license.
-
-Clojure logo by Tom Hickey.
View
16 example/hello_world.clj
@@ -1,16 +0,0 @@
-; A very simple Ring application.
-
-(ns ring.example.hello-world
- (:use ring.adapter.jetty)
- (:import java.util.Date java.text.SimpleDateFormat))
-
-(defn app
- [req]
- {:status 200
- :headers {"Content-Type" "text/html"}
- :body (str "<h3>Hello World from Ring</h3>"
- "<p>The current time is "
- (.format (SimpleDateFormat. "HH:mm:ss") (Date.))
- ".</p>")})
-
-(run-jetty app {:port 8080})
View
21 example/linted.clj
@@ -1,21 +0,0 @@
-; An example of inserting the linter between each component to ensure
-; compliance to the Ring spec.
-
-(ns ring.example.linted
- (:use (ring.handler dump)
- (ring.middleware stacktrace file file-info reload lint)
- (ring.adapter jetty)))
-
-(def app
- (-> handle-dump
- wrap-lint
- wrap-stacktrace
- wrap-lint
- wrap-file-info
- wrap-lint
- (wrap-file "example/public")
- wrap-lint
- (wrap-reload '(ring.handler.dump))
- wrap-lint))
-
-(run-jetty app {:port 8080})
View
BIN example/public/clojure.png
Deleted file not rendered
View
23 example/wrapping.clj
@@ -1,23 +0,0 @@
-; A example of modular construction of Ring apps.
-
-(ns ring.example.wrapping
- (:use ring.handler.dump
- ring.middleware.stacktrace
- ring.middleware.file-info
- ring.middleware.file
- ring.adapter.jetty))
-
-(defn wrap-error [app]
- (fn [req]
- (if (= "/error" (:uri req))
- (throw (Exception. "Demonstrating ring.middleware.stacktrace"))
- (app req))))
-
-(def app
- (-> handle-dump
- wrap-error
- (wrap-file "example/public")
- wrap-file-info
- wrap-stacktrace))
-
-(run-jetty app {:port 8080})

0 comments on commit c8089a8

Please sign in to comment.