It aims to implement easy communication with ArangoDB database using its HTTP API. This library is written in Erlang so that it can be used from both Erlang and Elixir.
Exdoc documentation is provided for this project here.
To rebar.config
add:
{deps, [
....
{earangodb, ".*", {git, "git://github.com/spawnfest/eArangoDB.git", {branch, "master"}}}
]}.
There is one parameter to be configured, which is a map containing self explanatory keys: url, port, user and password.
To configure the earangodb connection, put this parameter in persistent term storage, as shown below.
In your_project_app.erl
in start/2
just put:
start(_StartType, _StartArgs) ->
...
EarangodbWorkerConfig = #{
url => "localhost",
port => 8529,
user => <<"root">>,
password => <<"test">>
},
persistent_term:put(earangodb_config, EarangodbWorkerConfig),
{ok, _} = application:ensure_all_started(earangodb),
...
You may alternatively put this code under a separate supervisor's init.
To see the demo use case of this lib by going to: demo/demo_cities/README.md