Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed missing deref, updated to lein2 and fixed gitignore #1

Merged
merged 1 commit into from May 5, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions .gitignore
@@ -1,8 +1,7 @@
.DS_Store
pom.xml
*jar
/lib/
/classes/
/targets/
/target/
.lein-deps-sum
.env
*.iml
2 changes: 1 addition & 1 deletion Procfile
@@ -1 +1 @@
web: lein run -m smally.server
web: lein2 run -m smally.server
14 changes: 7 additions & 7 deletions project.clj
@@ -1,8 +1,8 @@
(defproject smally "0.0.9-SNAPSHOT"
:description "A simple url shortener written in clojure+redis using the compojure."
:dependencies [[org.clojure/clojure "1.3.0"]
[clj-redis "0.0.12"]
[ring/ring-jetty-adapter "0.3.10"]
[compojure "0.6.4"]
[hiccup "0.3.6"]
[clj-json "0.4.3"]])
:description "A simple url shortener written in clojure+redis using the compojure."
:dependencies [[org.clojure/clojure "1.3.0"]
[clj-redis "0.0.12"]
[ring/ring-jetty-adapter "0.3.10"]
[compojure "0.6.4"]
[hiccup "0.3.6"]
[clj-json "0.4.3"]])
2 changes: 1 addition & 1 deletion src/smally/controllers/main.clj
Expand Up @@ -23,7 +23,7 @@
; Looks up the next counter value in Redis
(defn next-val []
(if (nil? (redis/get db "counter"))
(redis/incrby db "counter" counter)
(redis/incrby db "counter" @counter)
(swap! counter (fn [counter] (incr "counter"))))
(log {:fn "next-val" :counter @counter}))

Expand Down
3 changes: 1 addition & 2 deletions src/smally/server.clj
Expand Up @@ -19,5 +19,4 @@

(defn -main []
(let [port (Integer/parseInt (System/getenv "PORT"))]
(start port)))

(start port)))