Live API: https://r1chy5zeeh.execute-api.us-east-1.amazonaws.com/prod
Project Tracker: https://github.com/Web-Dev-Speedrunners/flex-or-fail/projects/1
- NodeJS 12
- Yarn:
npm install -g yarn - Typescript:
yarn global add typescript - AWS CLI 2
- Configure AWS CLI
- AWS CDK:
yarn global add aws-cdk
- Navigate to
cdkfolder - Run
yarn install - Add the following environment variables to
.envincdkfolderFor internal developers, you can find these credentials in notionDB_HOST=<Database Host IP> DB_NAME=<Database Name> DB_USER=<Database Name> DB_PASSWORD=<Database Password> - Navigate to
api_root_lambda - Run
yarn install
Local development allows you to run the app using express on your local machine. This server will run on localhost:3000. This will allow you to quickly develop and test, however, you should deploy your solution to AWS and testing from there.
Working Directory: api_root_lambda
- Add the following environment variables to
.envincdkfolderDB_HOST=<Database Host IP> DB_NAME=<Database Name> DB_USER=<Database Name> DB_PASSWORD=<Database Password> - Run server:
yarn run server:local
Deployment allows you to run your code in the actual development environment the actual app might run on.
- All dependencies installed
- AWS Credential are configured (
aws configure)
- Navigate to
cdkdirectory - First Deployment Only Bootstrap your AWS Account:
cdk bootstrap - Run
yarn run deploy
When you make a database model change, you will need to update the database with the new changes. It runs the sequelize.sync command
- Navigate to
api_root_lambdadirectory - Update
.envfile with all the database environment variables - Sync database:
yarn run db:sync. You can also optionally pass in-fparameter to force sync. This is required for any breaking changes. Command:yarn run db:sync -f