Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.
/ eArangoDB Public archive

SpawnFest 2021

License

Notifications You must be signed in to change notification settings

spawnfest/eArangoDB

Repository files navigation

earangodb

CI Status

Erlang CI codecov

Description

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.

Documentation

Exdoc documentation is provided for this project here.

Installation

To rebar.config add:

{deps, [
    ....
    {earangodb, ".*", {git, "git://github.com/spawnfest/eArangoDB.git", {branch, "master"}}}
]}.

Configuration

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.

DEMO

To see the demo use case of this lib by going to: demo/demo_cities/README.md

Releases

No releases published

Packages

No packages published