AWS | Typescript REST API With DynamoDB

This example shows your how to create a TypeScript powered REST API with DynamoDB.

user  

Nikos

Clone This Example

Step #1 - npm install serverless -g
Step #2 - serverless install -u https://github.com/serverless/examples/tree/master/aws-node-typescript-rest-api-with-dynamodb -n  aws-node-typescript-rest-api-with-dynamodb

Introduction

TypeScript (ts) offers type safety which is helpful when working with the AWS SDK, which comes with ts definitions (d.ts)

compiling

You can compile the ts files in this directory by 1st installing typescript via

npm install -g typescript

then

npm i

You can then run the compiler by running tsc in this directory. It will pull the settings from .tsconfig and extra @types from package.json. The output create.js file is what will be uploaded by serverless.

For brevity, I have just demonstrated this to match with the todos/create.js lambda function

view on Github

Latest commit b2f54ec on Sep 24, 2017

New to serverless?

To get started, pop open your terminal & run:

npm install serverless -g