Skip to content

JaseElder/hapi-lambda-demo

 
 

Repository files navigation

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.

About

Demo of running Hapi.js on AWS Lambda

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.8%
  • Shell 1.2%