1.7.0 • Published 2 years ago

taf-connect v1.7.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

taf-connect

Connect API

Requirements

  • NodeJS 14.18
  • NPM 6.13.4
  • Serverless 1.66.0
  • AWS CLI (with configured account)

Environments

EnvironmentAWS AccountApp URL
developmentdazn-taf-devconnect.taf.dazn-dev.com
testingdazn-taf-testconnect.taf.dazn-test.com
stagingdazn-taf-stageconnect.taf.dazn-stage.com
productiondazn-taf-prodconnect.taf.indazn.com

General Notes

Taf-connect is a service which consists of two DynamoDB tables and Lambdas which make operations on DB. There is also an s3 bucket for storing time of last modification of DB.

Having two tables is an effect of some limitation of dynamoDB. Search is possible only using unique primary key. However we need a unique device name which is paired with unique device id.

DynamoDB tables:

  • devices (main) this is table stores all data referring to device and it's primary key is device name.
  • deviceId is used only for keeping unique relation between device id and device name

Diagram

NPM Commands which can be triggered locally

All commands should be executed in project root directory.

  • npm run commit - rum commitizen to commit changes
  • npm run lint - lint JS files
  • npm run lint:fix - lint JS files and fix linter errors
  • npm run lint:watch - watch for file changes and run linter for JS files
  • npm run sls:deploy:dev: - deploy to development environment
  • npm run sls:deploy:test: - deploy to testing environment
  • npm run sls:start:dynamoDb:local: - install and run dynamo db locally
  • npm run sls:remove:dynamoDb:local: - remove dynamo db locally
  • npm run sls:start:offline: start serverless offline
  • npm run test: - run unit tests
  • npm run test:coverage - run tests with coverage summary
  • npm run test:watch: - - watch for file changes and run tests

More info