Skip to content
Browse files

init

  • Loading branch information...
0 parents commit c160df2557d689ef515fca5075a1d4db3197bd13 @jamesward committed
Showing with 17 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +1 −0 Procfile
  3. +3 −0 project.clj
  4. +10 −0 src/web.clj
3 .gitignore
@@ -0,0 +1,3 @@
+/classes
+/lib
+/.lein-deps-sum
1 Procfile
@@ -0,0 +1 @@
+web: lein trampoline run -m demo.web $PORT
3 project.clj
@@ -0,0 +1,3 @@
+(defproject hello-world "0.0.1"
+ :dependencies [[org.clojure/clojure "1.3.0"]
+ [ring/ring-jetty-adapter "1.0.1"]])
10 src/web.clj
@@ -0,0 +1,10 @@
+(ns web
+ (:use [ring.adapter.jetty :only [run-jetty]]))
+
+(defn app [req]
+ {:status 200
+ :headers {"Content-Type" "text/plain"}
+ :body "Hello, world"})
+
+(defn -main [port]
+ (run-jetty app {:port (Integer. port)}))

0 comments on commit c160df2

Please sign in to comment.
Something went wrong with that request. Please try again.