guilhermesteves / subdocument-array-mutation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Subdocument Array mutation

Structure

.
├── modules (modules folder)
│   └── mutation (module / context)
│       └── endpoints (API endpoints)
│           └── mutate.js
├── package.json
├── serverless.yml (serverless config)
├── handlers (functions config)
│   └── mutation-endpoints.yml (endpoints config)
├── shared (shared components)
│   ├── mutation.js **(algorithm to mutate)**
│   └── api.js (API Gateway response helper)
└── test (tests folder)

Development environment

This boilerplate uses serverless-local plugin and some containers and plugins to emulate the AWS Resources

yarn run dev

The applications will start on http://localhost:3000

Dev Plugins

This boilerplate contains following plugins for local development:

Production environment

Deploy full services

serverless deploy -v

Deploy a function

serverless deploy function -f mutation

Get function logs

serverless mutation -f test -t

Clean All

serverless remove

Testing

All Tests

yarn run test

Unit Tests

yarn run unit-test

Integration Tests

yarn run integration-test

TODOs

  • Add Coverage Testing
  • Add automated build in CircleCI
  • Add Mongo and test the mutations
  • Set a background lambda and split the request for change in DB and the actual execution (adding an endpoint to see if transaction was completed)

About

License:MIT License


Languages

Language:JavaScript 97.9%Language:Dockerfile 2.1%