This project serves as a playground to explore event-based APIs and microservices.
This project is designed for deployment to Amazon Web Services (AWS) cloud. The AWS Cloud Development Kit (CDK) is used to create all of the necessary AWS cloud infrastructure to run the project.
Ensure the following requirements are met prior to usage:
- Node.js 18 or higher
- An active Amazon Web Services (AWS) account
- Clone the repository:
git clone git@github.com:tgillus/ecommerce.git
- Install the project dependencies:
cd ecommerce
npm install
- Create a
.env
in the root of the project based on the.env.example
file and add values for each of the environment variables:
cp .env.example .env
The environment variables have place holder values that need to be replaced with actual values.
NOTE: The .env
file can be used to store sensitive information that should be kept secret. Therefore do not commit the .env
file to source control.
Command | Description |
---|---|
npm run build |
Check for TypeScript errors. |
npm run watch |
Watch for changes and check for TypeScript errors. |
npm run test |
Execute unit tests. |
npm run cdk deploy |
Deploy a CDK stack to AWS. |
npm run cdk diff |
Compare a deployed stack with current state. |
npm run cdk destroy |
Delete a CDK stack (and its associated resources) from AWS. |
npm run cdk synth |
Emit synethesize CloudFormation template for a CDK stack. |
npm run format |
Format source files. |
npm run lint |
Run linter against source files. |
npm run lint:fix |
Lint source files and fix issues disovered by the linter. |
npm run build
npm run test
npm run cdk deploy -- --all
npm run test:e2e
npm run cdk destroy -- --all --force