This is a template project to create a TypeScript Lambda using Apollo Server with a TypeScript Layer mounted and running locally using AWS SAM.
-
Install node dependencies
npm ci
-
Start services on watch mode
npm run watch
This will start a watch for development of the Lambda and the Layer and will watch files and recompile whenever they change, and will start the AWS resources using SAM locally.
The GraphQL server will be available from the port 3000
and can be open using http://localhost:3000/graphql
.
The server on watch
mode will have introspection with the Apollo Playground for development.
The production build can be executed locally by running
npm run start:production
This will create a Lambda and Layer distribution with built-in optimizations for production, and will start locally the AWS SAM running on the port 3000
.
This project is licensed under the MIT License. See the LICENSE file.