- leverages (bitcoin) blockchain data from a Postgres database that has been imported with our blockchain_analyzer tool,
- and exposes the data as typed GraphQL API making it comfortable to query the blockchain data.
To get the API up and running, a Postgres database has to be installed first. The database schema
and the normalized data can then be automatically created and imported with our
In order to provide proper access to the Postgres database,
config/dev.exs has to parameterized
with the respective database connection settings. When running in production, this should be done by
prod.secret.exs as explained in
Then, to finally start our Phoenix server and expose the GraphQL API:
- Install dependencies with
- Start Phoenix endpoint with
Now you can visit
localhost:4000/api/graphiql from your browser
to open the interactive GraphQL in-browser IDE.
Ready to run in production? Please check the Phoenix deployment guides.
Static Code Analysis
We use Dialyzer, a static code analysis tool for Erlang, making it easier to find software discrepancies in our code base. It can be started as mix task via:
$ mix dialyzer
Furthermore, credo is used to improve code consistency which can also be started as mix task via:
$ mix credo
All tests can be executed as mix task via:
$ mix test