Skip to content
Browse files

heroku

  • Loading branch information...
1 parent 693cf7e commit b1b6f0f0da6f2c40dd2149d1d013045d8d835ae2 @wstrange committed Jan 26, 2012
Showing with 9 additions and 5 deletions.
  1. +1 −1 Procfile
  2. +8 −4 src/cloauth/server.clj
View
2 Procfile
@@ -1 +1 @@
-web: lein run -m cloauth.server
+web: lein run
View
12 src/cloauth/server.clj
@@ -30,14 +30,18 @@
(server/load-views "src/cloauth/views/")
+(def port (or
+ (if-let [p (System/getenv "PORT")]
+ (Integer/parseInt p)
+ 8080)))
(defn -main [& m]
- (let [mode (keyword (or (first m) :dev))
- port (Integer. (get (System/getenv) "PORT" "8080"))]
+ (let [mode (keyword (or (first m) :dev))]
+ (println "Starting on " port)
(server/start port {:mode mode
:ns 'cloauth})))
+; For dev - start server on load
+;(-main)
-; For dev - start server on load
-;(-main)

0 comments on commit b1b6f0f

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