calendar-serverless-api

SAM CLI 2. CDK CLI

Usage no npm install needed!

<script type="module">
  import calendarServerlessApi from 'https://cdn.skypack.dev/calendar-serverless-api';
</script>

README

calendar-serverless-api

Prerequisites

  1. SAM CLI
  2. CDK CLI

Getting started

  1. Clone the repo
  2. Run npm install at the root of the repo
  3. Run cdk synth followed by cdk deploy to deploy the serverless API

Local development (using SAM CLI)

  1. Add any npm dependencies by running cd resource && npm install <package-name> && cd ..
  2. Run cdk synth --no-staging > template.yaml to update the SAM stack for local development
  3. Run sam local start-api to test locally

More details on this workflow can be seen here

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template