Skip to content

gregschroeder/serverless-api-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless API Example

A very basic Price API template for building simple Lambda functions in NodeJs using the Serverless Framework.

Setup and Installation

AWS

Node and Serverless framework

Setup the code

  • Clone this repo
  • Launch a terminal in the root folder
  • Install all dependencies:
$ yarn install
$ yarn dynamodb-install

Running the code

Run locally (browse to http://localhost:3000 to try the API)

$ yarn runlocal

Running unit tests:

$ yarn test

Running integration tests (requires running server; yarn runlocal in other window):

$ yarn itest

Play with offline DynamoDB: http://localhost:8001/shell/

Deploying to AWS

$ yarn deploy

Remote tail of lambda functions running in AWS:

$ yarn taillog <functionName>

Note: The command serverless can be used interchangeably with sls for brevity.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •