Microservice ProductServiceApi created using AWS CDK, AWS API Gateway, AWS Lambda.
/products
The response from the lambda returns full array of products (mock data used and stored in Product Service).
/products/{productId}
The response from the lambda returns searched product from an array of products or error message and 404 status code if product was not found (mock data used and stored in Product Service).
Lambda handlers covered by unit tests.
Swagger (OpenAPI) documentation is provided https://raw.githubusercontent.com/gentoosiast/nodejs-aws-shop-backend/task-3/openapi.json
npm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testsnpm run test:watchrun jest unit test in watch modenpm run formatformat source code and configs with Prettiernpm run cdknpm run deploydeploy stack with the application to AWSnpm run destroydestroy deployed stack freeing all AWS resourcesnpx cdk deploydeploy this stack to your default AWS account/regionnpx cdk diffcompare deployed stack with current statenpx cdk synthemits the synthesized CloudFormation template