@jtviegas/entity-service

0.0.2 • Public • Published

Build Status Coverage Status

entity-service

a generic crud service for entities

overview

Installation

npm install @jtviegas/entity-service

Usage

required environment variables

- region - aws region ( not mandatory, default: eu-west-1 )
- AWS_ACCESS_KEY_ID ( mandatory )
- AWS_SECRET_ACCESS_KEY ( mandatory )
- DYNDBSTORE_TEST_ENDPOINT ( not mandatory, for testing purposes )

code snippet example

let service = require('@jtviegas/entity-service');
let event = {
                httpMethod: 'GET'
                , pathParameters: {
                    entity: ENTITY
                    , app: APP
                    , env: ENV
                }
            };
service.handler(event, context, (e,d)=>{
    if(e)
        done(e);
    else {
        let r=JSON.parse(d.body);
        expect(r.length).to.equal(TEST_ITERATIONS);
        done(null);
    }
});

Tests

npm test

Contributing

just help yourself and submit a pull request

Readme

Keywords

Package Sidebar

Install

npm i @jtviegas/entity-service

Weekly Downloads

0

Version

0.0.2

License

Unlicense

Unpacked Size

164 kB

Total Files

8

Last publish

Collaborators

  • jtviegas