parent
e75c5bf048
commit
c4a196f7fd
@ -0,0 +1,11 @@
|
||||
/target
|
||||
/classes
|
||||
/checkouts
|
||||
pom.xml
|
||||
pom.xml.asc
|
||||
*.jar
|
||||
*.class
|
||||
/.lein-*
|
||||
/.nrepl-port
|
||||
.hgignore
|
||||
.hg/
|
@ -0,0 +1,8 @@
|
||||
(defproject lein-neo4j "0.1.0"
|
||||
:description "neo4j server invokable from leiningen"
|
||||
:url "https://gitea.heevyis.ninja/josha/lein-neo4j"
|
||||
:license {:name "GPL-3.0"
|
||||
:url "https://opensource.org/licenses/GPL-3.0"}
|
||||
:dependencies [[org.neo4j/neo4j "3.4.4"]
|
||||
[org.neo4j.app/neo4j-server "3.4.4"]]
|
||||
:eval-in-leiningen true)
|
@ -0,0 +1,15 @@
|
||||
(ns leiningen.neo4j
|
||||
(:import org.neo4j.graphdb.factory.GraphDatabaseFactory
|
||||
org.neo4j.server.CommunityBootstrapper
|
||||
java.lang.Runtime
|
||||
java.lang.Thread
|
||||
java.util.Optional)
|
||||
(:require [clojure.java.io :as io]))
|
||||
|
||||
(defn neo4j
|
||||
[project & args]
|
||||
(let [path (io/as-file (get-in project [:neo4j :path] "target/neo4j"))
|
||||
config (get-in project [:neo4j :config] {})
|
||||
server (CommunityBootstrapper.)]
|
||||
(.start server path (Optional/empty) config)
|
||||
(while true (Thread/sleep 10000))))
|
Loading…
Reference in new issue