Skip to content
This repository was archived by the owner on May 15, 2019. It is now read-only.

datreeio/serverless-web-template-aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Web Template

The template is based on

Installation

  • $ nvm install (will use the .nvmrc Node.js version 6.10.2)
  • $ npm install (install dependencies)
  • $ npm install -g serverless (global installation of serverless)

Usage

  • $ npm run dev (run serverless-offline for local development)
  • $ npm run deploy-dev (deploys the service to dev)
  • $ npm run deploy-prod (deploys the service to prod)

(using the AWS credentials in ~/.aws/credentials)

Development

There are 2 example endpoints under the handler.js file (run the local dev server $ npm run dev)

GET /

$ curl -X GET http://localhost:3000/

POST /echo

$ curl -X POST \
  http://localhost:3000/echo \
  -H 'Content-Type: application/json' \
  -d '{"name": "testing echo service"}'

The template is based on Serverless Node.js Starter

Releases

No releases published

Packages

No packages published