Based on aws-nodejs-typescript.
git clone /~https://github.com/egonoid/microservice-template new-service
cd new-service
rm -rf .git
- Set
version
to your preferred value (e.g. 0.0.1) - Set
name
to your preferred value (e.g. acme-tenant-service) - Set
description
to your preferred value (e.g. ACME Tenant Microservice)
git init
git add --all
git commit -m "Initial commit"
yarn
sls dynamodb install -s dev
yarn start
Execute ping function
curl http://localhost:3000/ping?message=test
or
sls invoke local -f ping -p events/ping.json
yarn format
yarn lint
VSCode debugging is configured for ping function.
An example can be found at src/handlers/ping/ping.test.ts
.
Single run tests:
yarn test
Start tests in watch mode:
yarn test:watch