Commits

Steve Losh committed aabf332

Clean up a bit.

Comments (0)

Files changed (5)

+.vagrant
+pom.xml
+*jar
+lib/
+classes/
+.lein-failures
+.lein-deps-sum
+scratch.clj
+src/newseasons/settings.clj
 newseasons
 ==========
 
-A simple Clojure webapp for keeping track of when new seasons of TV shows hit
-iTunes 
+A simple Clojure webapp that notifies users when new seasons of their favorite
+TV shows hit iTunes.
+
+Requirements
+------------
+
+[Vagrant](http://vagrantup.com/).
 
 Usage
 -----
 
+Clone down the repo:
+
+    hg clone http://bitbucket.org/sjl/newseasons
+    # or
+    git clone http://github.com/sjl/newseasons
+
+    cd newseasons
+
+Spin up a VM, SSH in, and set up the environment:
+
+    vagrant up
+
+    ssh vagrant
+    cd /vagrant
+
+    cp src/newseasons/settings-vagrant.clj src/newseasons/settings.clj
     lein deps
+
+Run the web server (while SSH'ed in):
+
     lein run
 
+To run the check-for-new-seasons/notify-users loop:
+
+    lein run :refresh
+
 License
 -------
 

src/newseasons/server.clj

 (ns newseasons.server
+  (:use newseasons.settings)
   (:use [newseasons.middleware.session.redis :only (redis-store)])
   (:require [noir.server :as server]))
 
         port (Integer. (get (System/getenv) "PORT" "8000"))]
     (server/start port {:mode mode
                         :ns 'newseasons
-                        :session-store (redis-store "localhost" "devpass")})))
+                        :session-store (redis-store "localhost" redis-pass)})))
 

src/newseasons/settings-template.clj

+(ns newseasons.settings)
+
+(def redis-pass "")
+(def postmark-api-key "POSTMARK_API_TEST")

src/newseasons/settings-vagrant.clj

+(ns newseasons.settings)
+
+(def redis-pass "devpass")
+(def postmark-api-key "POSTMARK_API_TEST")