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 build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testsnpm run test:watch
run jest unit test in watch modenpm run format
format source code and configs with Prettiernpm run cdk
npm run deploy
deploy stack with the application to AWSnpm run destroy
destroy deployed stack freeing all AWS resourcesnpx cdk deploy
deploy this stack to your default AWS account/regionnpx cdk diff
compare deployed stack with current statenpx cdk synth
emits the synthesized CloudFormation template