Getting started
September 2, 2022 ยท View on GitHub
Commanded can be installed from the package manager hex as follows.
-
Add
commandedto your list of dependencies inmix.exs:def deps do [{:commanded, "~> 1.4"}] end -
Optionally add
jasonto support JSON serialization viaCommanded.Serialization.JsonSerializer:def deps do [{:jason, "~> 1.3"}] end -
Fetch mix dependencies:
$ mix deps.get -
Define a Commanded application module for your app, see the Application guide for details.
defmodule MyApp.Application do use Commanded.Application, otp_app: :my_app end -
Configure one of the supported event stores by following the Choosing an Event Store guide.