Skip to content

hemerajs/hemera-dynamodb-store

Repository files navigation

Hemera-dynamodb-store package

Build Status npm styled with prettier

This is a plugin to use DynamoDB with Hemera

Install

npm i hemera-dynamodb-store --save

Example

hemera.use(require('hemera-dynamodb-store'), {
   dynamodb: {
        endpoint: 'http://localhost:8000',
        region: 'eu-west-2'
    }
})

hemera.ready(() => {
  hemera.act({
    topic: 'dynamo-store',
    cmd: 'create',
    collection: 'test',
    data: {
      id: '12345' , 
      name: 'John Doe'
    }
  }, function (err, resp) {
    this.log.info(resp, 'Query result')
  })
})

Tests

npm run test

Examples

Here you can find some examples.

API

See Store Interface.

Dependencies

  • hemera-joi