This template service gives you the latest in modern JavaScript (ES6 via Webpack + Babel, testing with Jest, linting with ESLint, and formatting with Prettier), the ease and power of Serverless, and bootstrapped DynamoDB and S3 infrastructure.
Once installed, you can create and deploy functions with the latest ES6 features in minutes, with linting and formatting baked in.
# Install dependencies
yarn install# Start local API gateway
yarn startJest is installed as the testrunner. To create a test, co-locate your test with the file it's testing
as <filename>.test.js and then run/watch tests with:
yarn testAssuming you've already set up your default AWS credentials:
yarn deployyarn deploy will deploy to the development environment. You can deploy to staging or production
with:
yarn deploy:staging
# -- or --
yarn deploy:productionAfter you've deployed, the output of the deploy script will give you the API endpoint for your deployed function(s), so you should be able to test the deployed API via that URL.
Assuming you're finished with your environment, you can delete the stack with:
yarn cleanupyarn cleanup will remove the development environment.
