aws-ts-starter
is a serverless seed written in Typescript that provides the following out of the box:
- Follows The Repository Pattern
- Structured and intended to be used as a microservice
- 100% unit test coverage of all boilerplate module code to encourage BDD/TDD
- Fully functional end-to-end testing of the specified API via a Serverless YAML
- A default Repository implementation against a Dynamo DB
- An AWS handler wrapper that takes care of the API Gateway callback and error handling, either by thrown errors or by caught promises
- Fork / Clone this repository
npm install
- Replace
module
andModule
with the name of your api- e.g.
ModuleService
=>PetService
;ModuleRepo
=>PetRepo
- e.g.
- Install the AWS CLI -
npm install -g aws
- Install the Serverless CLI -
npm install -g serverless
- Configure your AWS CLI -
aws configure
TODO: Serverless Generator
A .travis.yml file is already included for you. If you do not have a Travis CI account, go here. Once registered, activate your repository, navigate to settings, and add the following Environment Variables:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
This seed uses AWS as the provider by default and these credentials are used to deploy and run your serverless application.
A public place to display code coverage of your API. Add this Environment Variable to your Travis CI repository's settings:
repo_token
- Coveralls token for uploading code coverage report
Unit tests can be run via npm test
. If you have never run the end to end tests, or have code changes that need to be deployed before running the end to end tests, use npm run test:e2e:deploy
, otherwise to execute the end to end tests of what is deployed to your serverless provider, use npm run test:e2e
.