Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (26 sloc) 983 Bytes

elasticsearch-adapter

A library that implements the Read Model Adapter interface for storing projections on AWS ElasticSearch.

Methods

build

build({ entityName }, { endpoint )

builds a read-model adapter

Parameters

attribute type description
entityName string the name of the entity
endpoint string the ElasticSearch instance endpoint url

Returns

an object with read model methods

Example

{% code-tabs %} {% code-tabs-item title="adapter.js" %}

const elasticAdapterBuilder = require('serverless-cqrs.elasticsearch-adapter')
module.exports = elasticAdapterBuilder.build({ 
  entityName: 'todo'
}, {
  endpoint: 'https://xxxxxx.yyy/zzzz/1234',
})

{% endcode-tabs-item %} {% endcode-tabs %}

You can’t perform that action at this time.