1.0.2 • Published 8 years ago
lexicon-rest-api v1.0.2
aws-nodejs-typescript
This repository contains a starter project template for Serverless projects running on AWS.
Built with Serverless and TypeScript.
This is a custom version of the default aws-nodejs-typescript template in the Serverless
repository.
Here are the notable differences:
- comes with
@types/aws-lambdafor typed Lambda handler function definition - more verbose TypeScript configuration in
tsconfig.json - no Webpack dependency or configuration needed; instead uses
serverless-plugin-typescript - comes with the
serverless-offlineplugin for local development
Usage
Setup
Here are the steps to create a new project based on this template.
Install serverless globally.
npm install -g serverlessCreate a new project based on this template, specifying the name for your new project.
serverless install --url https://github.com/echelon-solutions/aws-nodejs-typescript --name <my-new-project>Install the project dependencies.
cd <my-new-project> npm install
Develop
Run a mocked local environment with hot-reload ...
npm run devThis will start a mock API Gateway serving the Lambda functions you've defined.
Call the API at http://localhost:3000.
Deploy
Deploy the project to the cloud ...
npm run deployFurther Reading
Browse the following resources for more information:
- Serverless documentation
- TypeScript documentation
- AWS documentation