1.7.0 • Published 2 years ago
taf-connect v1.7.0
taf-connect
Connect API
Requirements
- NodeJS 14.18
- NPM 6.13.4
- Serverless 1.66.0
- AWS CLI (with configured account)
Environments
Environment | AWS Account | App URL |
---|---|---|
development | dazn-taf-dev | connect.taf.dazn-dev.com |
testing | dazn-taf-test | connect.taf.dazn-test.com |
staging | dazn-taf-stage | connect.taf.dazn-stage.com |
production | dazn-taf-prod | connect.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
NPM Commands which can be triggered locally
All commands should be executed in project root directory.
npm run commit
- rum commitizen to commit changesnpm run lint
- lint JS filesnpm run lint:fix
- lint JS files and fix linter errorsnpm run lint:watch
- watch for file changes and run linter for JS filesnpm run sls:deploy:dev
: - deploy to development environmentnpm run sls:deploy:test
: - deploy to testing environmentnpm run sls:start:dynamoDb:local
: - install and run dynamo db locallynpm run sls:remove:dynamoDb:local
: - remove dynamo db locallynpm run sls:start:offline
: start serverless offlinenpm run test
: - run unit testsnpm run test:coverage
- run tests with coverage summarynpm run test:watch
: - - watch for file changes and run tests