The code sample shows how to create a simple Elixir app that works with YugabyteDB using the Postgrex driver or the Phoenix framework.
The instructions below are provided for YugabyteDB Aeon deployments. However, the app also works with other types of deployments, including database instances running on your own laptop.
- The latest versions of the Elixir, Erlang VM, IEx and Mix.
- If you plan to run the Phoenix sample app, then install all the required components. Note, you don't need to install Postgres for Phoenix as long as you'll use YugabyteDB.
- Command line tool or your favourite IDE, such as IntelliJ IDEA, or Eclipse.
- Start a free instance of YugabyteDB Aeon.
- Add an IP address of your machine/laptop to the IP allow list
Clone the application repo:
git clone https://github.com/YugabyteDB-Samples/yugabytedb-simple-elixir-app.git && cd yugabytedb-simple-elixir-app
Start the app using the Postgrex driver or Phoenix framework:
Having issues running this application or want to learn more from the Yugabyte community?
Join our Slack channel!