1.0.0 • Published 5 months ago

betty-api v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

betty-api

Quick Start

AWS SSO login is optional. Only needed if you want to test invoking the agent. Invoking the agent can be bypassed by using one of the TEST PROMOPTS: '#player#', '#parlay#', '#single#'

Follow steps here for AWS SSO login https://fanduel.atlassian.net/wiki/spaces/DEVOPS/pages/511246428/IAM+Assuming+Roles+-+From+the+CLI

nvm use
npm install
npm start

Run an endpoint locally

cp .env.local.example .env.local
npm run api-handler "/v1/betty?prompt=#player#&sessionId=123&state=co"

Output will be in the newly created debug dir All endpoints with their command to run them (in the comments) are in src/controllers Main file: src/index.js

Run unit test locally

npm run test

Encoding TF variables:

  • assume devfulladmin role
  • dev: fd-encryption-cli -k "arn:aws:kms:us-east-1:446345481538:alias/infrastructure-deploy-service-development" -f ./infrastructure/aws/variables/development.enc.tfvars.json -e
  • sb-dev: fd-encryption-cli -k "arn:aws:kms:us-east-1:446345481538:alias/infrastructure-deploy-service-sportsbookdev" -f ./infrastructure/aws/variables/sportsbookdev.enc.tfvars.json -e
  • prod: fd-encryption-cli -k "arn:aws:kms:us-east-1:446345481538:alias/infrastructure-deploy-service-sportsbook" -f ./infrastructure/aws/variables/sportsbook.enc.tfvars.json -e

  • buildkite: fd-encryption-cli -k arn:aws:kms:us-east-1:077700697743:alias/bk-generic-ear -e -f .buildkite/secrets.yaml