|
|
@ -14,13 +14,18 @@
|
|
|
|
#(re-matches
|
|
|
|
#(re-matches
|
|
|
|
#"[0-9a-f]+-[0-9a-f]+-[0-9a-f]+-[0-9a-f]+-[0-9a-f]+" %))
|
|
|
|
#"[0-9a-f]+-[0-9a-f]+-[0-9a-f]+-[0-9a-f]+-[0-9a-f]+" %))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(def standard-port "7687")
|
|
|
|
|
|
|
|
(def standard-host "localhost")
|
|
|
|
|
|
|
|
(def standard-user "neo4j")
|
|
|
|
|
|
|
|
(def standard-pass "b")
|
|
|
|
|
|
|
|
|
|
|
|
(defn create-conn!
|
|
|
|
(defn create-conn!
|
|
|
|
([]
|
|
|
|
([]
|
|
|
|
(let [env #(or (System/getenv %1) %2)
|
|
|
|
(let [env #(or (System/getenv %1) %2)
|
|
|
|
port (env "NEO4J_PORT" "7687")
|
|
|
|
port (env "NEO4J_PORT" standard-port)
|
|
|
|
host (env "NEO4J_HOST" "localhost")
|
|
|
|
host (env "NEO4J_HOST" standard-host)
|
|
|
|
user (env "NEO4J_USER" "neo4j")
|
|
|
|
user (env "NEO4J_USER" standard-user)
|
|
|
|
pass (env "NEO4J_PASS" "b")]
|
|
|
|
pass (env "NEO4J_PASS" standard-pass)]
|
|
|
|
(create-conn! port host user pass)))
|
|
|
|
(create-conn! port host user pass)))
|
|
|
|
([port host user pass]
|
|
|
|
([port host user pass]
|
|
|
|
(db/connect
|
|
|
|
(db/connect
|
|
|
|