- Download extension ESLint and Prettier - Code formatter in your VSCode.
- Install node 16.13.2.
- Install pnpm ^7.x.x.
- (Required for MacOSX): Execute this command to grant Husky the necessary permissions to run the pre-commit hook.
chmod ug+x .husky/*
chmod ug+x .git/hooks/*
- (Optional): Do this if you are using nvm.
nvm use # For MacOSX and Linux
nvm use $(cat .nvmrc) # For Windows (Git Bash)
Install Dependencies:
pnpm i
Build:
pnpm build --stage=<stage>
Development:
pnpm dev --stage=<stage>
Secrets:
Note: Secrets are stored in AWS Secrets Manager (Parameter Store).
If you want to add secrets, you need to follow these steps:
- Go to
stacks/secrets.ts
and add your secret key tosecrets
object. - Either run
pnpm secrets set <key> <value> --stage <stage>
orpnpm secrets load <path_to_env> --stage <stage>
to add secrets to AWS Secrets Manager. - Run
pnpm build --stage <stage>
to build the project.
Add secret
pnpm secrets set <secret_key> <secret_value> --stage=<stage>
List of secrets
pnpm secrets list --stage=<stage>
Delete secret
pnpm secrets remove <secret_key> --stage=<stage>
Load secrets from .env file
pnpm secrets load <path_to_env> --stage=<stage>