Skip to content

DConcord/CubesAndCardboardAPI

Repository files navigation

Install Dependencies

AWS SAM CLI

brew install aws-sam-cli

Install esbuild in the root of the project folder

npm install

Deploy

Environment-specific parameters (dev vs prod) are defined in samconfig.yaml and passed to the SAM template for deployment. Use the "--config-env" prameter to specify dev vs prod during build/deploy

Dev

aws s3 cp ./rsvp_alerts_ts/template.html s3://dev-cubes-and-cardboard-backend && \
sam build --config-env dev && sam deploy --config-env dev && date

Prod

aws s3 cp ./rsvp_alerts_ts/template.html s3://prod-cubes-and-cardboard-backend && \
sam build --config-env prod && sam deploy --config-env prod && date
--confirm-changeset

Test Locally

Python

Initialize the python virtual env (venv) in the root folder of the project:

mkdir .venv
pipenv install

Initialize the venv (if not done so already by VSCode) and run the script

pipenv shell
python ./manage_events/app.py

Node.JS

Initialize and Retrieve Node modules in the JS Lambda folder. For Example:

cd ./rsvp_alerts_ts
npm install

Export environment variables locally. Dev or example:

export RSVP_SQS_URL=X
export S3_BUCKET=cdkstack-bucketdevff8a9acd-pine3ubqpres
export TABLE_NAME=game_events_dev

Build the code in JS (can't run TS directly, it wraps JS) with SAM in the project root and run with node

cd ..
sam build --config-env dev
node .aws-sam/build/RsvpAlertsFunction/app.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published