Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/leiningen/gorilla.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
(defn gorilla
[project & opts]
(let [opts-map (apply hash-map opts)
port (read-string (or (get opts-map ":port") "0"))
ip (or (get opts-map ":ip") "127.0.0.1")
gorilla-options (:gorilla-options project)
port (or (:port gorilla-options) (read-string (or (get opts-map ":port") "0")))
ip (or (:ip gorilla-options) (get opts-map ":ip") "127.0.0.1")
nrepl-port (read-string (or (get opts-map ":nrepl-port") "0"))
;; inject the gorilla-repl dependency into the target project
curr-deps (or (:dependencies project) [])
new-deps (conj curr-deps ['gorilla-repl/gorilla-repl gorilla-version])
prj (assoc project :dependencies new-deps)
project-name (:name project)
gorilla-options (:gorilla-options project)]
project-name (:name project)]
(eval/eval-in-project
prj
`(g/run-gorilla-server {:port ~port
Expand Down