0.3.2-alpha.7 • Published 6 years ago

@dployhub/feathers-dynamoose v0.3.2-alpha.7

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

feathers-dynamoose

Build Status Code Climate Test Coverage Download Status

Feathers service with AWS DynamoDb via dynamoose

Installation

npm install @dployhub/feathers-dynamoose --save

Documentation

// app.js
const feathersDynamoose = require('@dployhub/feathers-dynamoose');

app.use('/users', feathersDynamoose(
  options, // See below for full list of options
  optionalDynamooseOptions // See https://dynamoosejs.com/api#dynamoosemodelname-schema-options
));

Options

Options is a JavaScript object with the following keys:

KeyDescriptionRequired
modelNameThe name of the model.
schemaThe schema for the model. Refer to https://dynamoosejs.com/api/schema/#options
localUrlIf the key is present, will instantiate dynamoose with dynamoose.local(localUrl)

Examples

// src/users/schema.js
module.exports = {
  postId: {type: String, hashKey: true},
  blogId: {type: String, rangeKey: true},
};

// src/app.js
const uuid = require('uuid/v4');
const feathersDynamoose = require('@dployhub/feathers-dynamoose');
const postsSchema = require('users/schema');

app.use('/v1/posts', feathersDynamoose({modelName: 'posts', schema: postsSchema}));
// create a new record
const record = await app.service('v1/posts').create({postId: uuid(), blogId: uuid()});
// delete a record. id accepts an object.
await app.service('v1/posts').delete({postId: record.postId, blogId: record.blogId});

License

Copyright (c) 2018

Licensed under the MIT license.

0.3.2-alpha.7

6 years ago

0.3.2-alpha.6

6 years ago

0.3.2-alpha.5

6 years ago

0.3.2-alpha.4

6 years ago

0.3.2-alpha.3

6 years ago

0.3.2-alpha.2

6 years ago

0.3.2-alpha.1

6 years ago

0.3.2-alpha.0

6 years ago

0.3.1-alpha.18

6 years ago

0.3.1-alpha.17

6 years ago

0.3.1-alpha.16

6 years ago

0.3.1-alpha.15

6 years ago

0.3.1-alpha.14

6 years ago

0.3.1-alpha.13

6 years ago

0.3.1-alpha.12

6 years ago

0.3.1-alpha.11

6 years ago

0.3.1-alpha.10

6 years ago

0.3.1-alpha.9

6 years ago

0.3.1-alpha.8

6 years ago

0.3.1-alpha.7

6 years ago

0.3.1-alpha.6

6 years ago

0.3.1-alpha.5

6 years ago

0.3.1-alpha.4

6 years ago

0.3.1-alpha.3

6 years ago

0.3.1-alpha.2

6 years ago

0.3.1-alpha.1

6 years ago

0.3.1-alpha.0

6 years ago

1.0.0

6 years ago