@resolve-js/eventstore-lite
v0.34.3
Published
An adapter reSolve uses to store events in a file or memory.
Downloads
93
Maintainers
Readme
@resolve-js/eventstore-lite
This package is a event store adapter used to store events in a file or memory.
Available Parameters
You can pass the following argument when initializing an adapter:
databaseFile
- the path to a file where events are stored. If set to ":memory:", all data is lost when an application instance is restarted.
Usage
import createAdapter from '@resolve-js/eventstore-lite'
const fileAdapter = createAdapter({
databaseFile: './store.db',
})
const memoryAdapter = createAdapter({
databaseFile: ':memory:',
})