DynamoDB adapter for Moleculer DB service with dynamodb.
Features
Install
npm install moleculer-db-adapter-dynamodb --save
You have to install additional packages for creating model:
npm install dynamodb --save
Usage
'use strict'; const ServiceBroker = ;const DbService = ;const DynamoAdapter = ;const dynamodb = ;const Joi = ; const broker = ; // Create a dynamodb service for `post` entitiesbroker; broker start // Create a new post // Get all posts ;
Options
Every constructor arguments are passed to the aws-sdk
config . Read more about aws sdk.
Example with connection options
accessKeyId: '' // your id here secretAccessKey: '' // your key here region: '' // your region here;
Test
npm test
In development with watching
npm run watch:test
License
The project is available under the MIT license.