Skip to content

zblanco/commanded-eventstore-adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EventStore adapter for Commanded

Use the PostgreSQL-based EventStore with Commanded.

MIT License

Build Status

Getting started

The package can be installed from hex as follows.

  1. Add commanded_eventstore_adapter to your list of dependencies in mix.exs:

    def deps do
      [{:commanded_eventstore_adapter, "~> 0.2"}]
    end
  2. Include :eventstore in the list of applications to start.

    For Elixir 1.4, add :eventstore to the extra applications list in mix.exs:

    def application do
      [
        extra_applications: [
          :logger,
          :eventstore,
        ],
      ]
    end

    For Elixir 1.3 and before, add :eventstore to the applications list in mix.exs:

    def application do
      [
        applications: [
          :logger,
          :eventstore,
        ],
      ]
    end
  3. Configure Commanded to use the event store adapter:

    config :commanded,
      event_store_adapter: Commanded.EventStore.Adapters.EventStore
  4. Configure the eventstore in each environment's mix config file (e.g. config/dev.exs), specifying usage of the included JSON serializer:

    config :eventstore, EventStore.Storage,
      serializer: Commanded.Serialization.JsonSerializer,
      username: "postgres",
      password: "postgres",
      database: "eventstore_dev",
      hostname: "localhost",
      pool_size: 10
  5. Create the eventstore database and tables using the mix task:

    mix event_store.create
    

About

EventStore adapter for Commanded

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 100.0%