guilhermesteves / insurance-risk

Studies on tests with cucumber, conditional engines, jest units and serverless

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Risk Insurance

A project to calculate different risk insurances using Serverless

Structure

.
├── modules (modules folder)
│   └── mutation (module / context)
│       └── endpoints (API endpoints)
│           └── insurance.js
├── package.json
├── serverless.yml (serverless config)
├── handlers (functions config)
│   └── insurance-endpoints.yml (endpoints config)
├── shared (shared components)
│   ├── insurance.js **(algorithm to insurance)**
│   └── 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 insurance

Get function logs

serverless insurance -f test -t

Clean All

serverless remove

Testing

All Tests

yarn run test

Unit Tests

yarn run test:unit

Integration Tests

yarn run test:integration

DB

Seed db with

yarn run cli db seed --dryRun --server "mongodb://localhost:27017/insurance-risk?retryWrites=true&w=majority"

About

Studies on tests with cucumber, conditional engines, jest units and serverless

License:MIT License


Languages

Language:JavaScript 94.1%Language:Gherkin 4.5%Language:Shell 0.8%Language:Dockerfile 0.6%