Permalink
Browse files

Read .nrepl-port file when starting nrepl

  • Loading branch information...
swlkr committed Aug 8, 2018
1 parent 983506c commit 47525624e34ee683d82ceb624bffae5479066fa6
Showing with 3 additions and 2 deletions.
  1. +3 −2 bin/repl.clj
View
@@ -1,8 +1,9 @@
(ns repl
(:require [nrepl.server]))
(let [port (or (some-> (first *command-line-args*)
(java.lang.Long/parseLong))
(let [port (or (some->> (slurp ".nrepl-port")
(re-find #"^\d+$")
(Integer.))
7888)]
(nrepl.server/start-server :port port)
(println "Started nREPL on port" port))

0 comments on commit 4752562

Please sign in to comment.