Skip to content

egonoid/microservice-template

Repository files navigation

egonoid Microservice Template

Based on aws-nodejs-typescript.

Installation

Clone Microservice Template

git clone https://github.com/egonoid/microservice-template new-service
cd new-service
rm -rf .git

Update package.json

  • 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)

Add to Git

git init
git add --all
git commit -m "Initial commit"
yarn

Development

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

Linting & Code formatting

yarn format
yarn lint

Debugging

VSCode debugging is configured for ping function.

Testing

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

Mocks

About

Template starter project for egonoid serverless microservices.

Resources

License

Stars

Watchers

Forks

Packages

No packages published