项目作者: montera82

项目描述 :
A product catalog micro service.
高级语言: TypeScript
项目地址: git://github.com/montera82/product-catalog-service.git
创建时间: 2020-12-31T01:44:58Z
项目社区:https://github.com/montera82/product-catalog-service

开源协议:

下载


Introduction

A simple Product Catalog service using aws-lambda functions and infrastructure with CDK.

Deploying

Service is deployed with CDK https://docs.aws.amazon.com/cdk/index.html

  1. npm run build && npm run cdk

Running tests

From project root run npm run build && npm run test you should be greated with something similar to below:

  1. PASS test/product-catalog-service.test.ts (6.725 s)
  2. Test Infrastructure resources (178 ms)
  3. Test Suites: 1 passed, 1 total
  4. Tests: 1 passed, 1 total
  5. Snapshots: 0 total
  6. Time: 7.633 s
  7. Ran all test suites.

Endpoints:

  1. POST - /products

Run example on your terminal.

  1. curl --location --request POST 'https://b73o41fzxb.execute-api.eu-west-1.amazonaws.com/prod/products' \
  2. --header 'Content-Type: application/json' \
  3. --data-raw '{
  4. "name": "Porsche cayenne",
  5. "sku": "PC-4999-33"
  6. }'

Todo

  • Regression test for lambda-layer
  • More infrastructure tests