https://github.com/slashdotdash/kv
Key/value store using Elixir and Commanded CQRS/ES
https://github.com/slashdotdash/kv
Last synced: about 1 year ago
JSON representation
Key/value store using Elixir and Commanded CQRS/ES
- Host: GitHub
- URL: https://github.com/slashdotdash/kv
- Owner: slashdotdash
- Created: 2018-06-25T20:24:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-25T20:30:19.000Z (almost 8 years ago)
- Last Synced: 2025-02-13T17:48:59.446Z (over 1 year ago)
- Language: Elixir
- Size: 5.86 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kv
Key/value store in Elixir using Commanded CQRS/ES.
## Getting started
1. Clone Git repo from GitHub:
```console
git clone https://github.com/slashdotdash/kv.git
```
2. Fetch mix dependencies:
```console
mix deps.get
```
3. Create and initialise event store database:
```console
mix do event_store.create, event_store.init
```
4. Create and migrate read store database:
```console
mix do ecto.create, ecto.migrate
```
Finally, run the application using `iex`:
```console
iex -S mix run
```
## Usage
Once you've started an `iex` console you can start interacting with the `kv` application by dispatching commands.
```elixir
:ok = Kv.Router.dispatch(%Kv.PutValue{key: "foo", value: 1})
:ok = Kv.Router.dispatch(%Kv.IncrementValue{key: "foo", increment: 1})
```