Demo of running Hapi.js on AWS Lambda
Clone or download
Latest commit 2c218eb Sep 5, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src upgraded to hapi 17.x Sep 3, 2018
.editorconfig init commit Mar 31, 2017
.gitignore init commit Mar 31, 2017
.jscsrc init commit Mar 31, 2017
.jshintrc init commit Mar 31, 2017
LICENSE Initial commit Mar 31, 2017
README.md init commit Mar 31, 2017
debug-sls.sh init commit Mar 31, 2017
index.js upgraded to hapi 17.x Sep 3, 2018
jasmine.json init commit Mar 31, 2017
package.json upgraded to hapi 17.x Sep 3, 2018
serverless.yml init commit Mar 31, 2017
yarn.lock init commit Mar 31, 2017

README.md

Hapi.js Lambda Demo

A demo of running Hapi.js on AWS Lambda.

This application uses Hapi as the foundation, and is deployed to AWS Lambda and API gateway. We use the Serverless framework to provision and deploy the stack to AWS, as well as run it locally for debugging purposes.

Getting Started

Run yarn install from a shell or bash based window, then execute any of the following commands. To execute deployments, you must have configured your default AWS profile with an account that has access to Lambda, API Gateway, and Cloudformation.

To edit any of the parameters involved in deploying to AWS, check out the serverless.yml file.

Development server

Run npm start for a dev server. View the swagger file at http://localhost:3000/swagger.json`.

Debugging server

Run npm run debug for a debuggable instance. Setting the NODE_ENV variable to whatever environment you are running in will load the correct config. dev, qa, stage, prod

Running unit tests

Run npm test to execute the unit tests via Jasmine. To get detailed debugging output, run the tests with DEBUG=true npm test.

API Documentation

API documentation is provided by Swagger and can be accessed at http://localhost:3000/swagger.json.