- Command Line
-
On the command line, you can supply a JSON/EDN configuration file using
-f <file>
- Java
-
For a Java in-process node, the modules are configured using the supplied Configurator, a file, or a classpath resource:
import crux.api.Crux; ICruxAPI cruxNode = Crux.startNode(new File(...)); ICruxAPI cruxNode = Crux.startNode(MyApp.class.getResource(...)); ICruxAPI cruxNode = Crux.startNode(n -> { // ... });
- Kotlin
-
For a Kotlin in-process node, the modules are configured using the supplied Configurator, a file, or a classpath resource:
import crux.api.Crux val cruxNode = Crux.startNode(File(...)) val cruxNode = Crux.startNode(MyApp::class.java.getResource(...)) val cruxNode = Crux.startNode { n -> // ... }
- Clojure
-
For a Clojure in-process node, the
start-node
function accepts a module tree, a file, or a resource.(require '[crux.api :as crux] '[clojure.java.io :as io]) (crux/start-node {...}) ; module tree (crux/start-node (io/file ...)) (crux/start-node (io/resource ...))