JavaScript
Permalink
Failed to load latest commit information.
lib Initial import Nov 14, 2016
test Improved get movies acceptance test readability Nov 14, 2016
.gitignore Initial import Nov 14, 2016
Dockerfile Initial import Nov 14, 2016
LICENSE Initial import Nov 14, 2016
README.md Initial import Nov 14, 2016
index.js Initial import Nov 14, 2016
movies.json Initial import Nov 14, 2016
package.json Initial import Nov 14, 2016
serverless.yml Initial import Nov 14, 2016

README.md

Serverless TDD example

Requirements

  • Docker

Usage

Build and start Docker container

docker build -t xpeppers/lambda .
docker run -it -v $(pwd):/home/ec2user xpeppers/lambda

Install dependencies

npm install

Run unit tests

npm test

Run acceptance tests locally

npm run test:acceptance

Create a .env file with AWS credentials (Admin access is needed)

AWS_ACCESS_KEY_ID=<key>
AWS_SECRET_ACCESS_KEY=<secret>

Deploy to AWS

npm run deploy

Run tests against AWS endpoint returned by deploy command

npm run test:acceptance ENDPOINT=<AWS Endpoint>