aws-lambda-stateful-express-boilerplate

1.0.1 • Public • Published

aws-lambda-stateful-express-boilerplate

Dependencies NPM Downloads NPM version Open Source Love retire

Boilerplate for a stateful Express.js application running on AWS Lambda using:

  • Claudia.js to deploy/manage AWS assets
  • Babel to transpile code from es2017
  • Webpack to bundle static files
  • AirBnb eslint rules for code styling
  • DynamoDB for session synchronization
  • csurf for protection against CSRF
  • Helmet.js to prevent several attack vectors
  • Handlebars for server-side templating
  • Local development with dynamodb_local
  • Yarn for dependency management

Running locally

Start a local DynamoDB on port 8000 as described here or as a Docker container. Then run:

yarn start

Then access the application on https://localhost:8443.

Deploying to AWS

Setup AWS cli as described here.

Then run:

REGION=eu-west-2 PROFILE=myProfile yarn run deploy

Don't forget to add a trailing '/' on the lambda URL if you are not using a custom domain, otherwise relative paths won't work.

Updating a deployed app

PROFILE=myProfile yarn run update

Destroying/undeploying the app

PROFILE=myProfile yarn run destroy

Dependencies (10)

Dev Dependencies (15)

Package Sidebar

Install

npm i aws-lambda-stateful-express-boilerplate

Weekly Downloads

9

Version

1.0.1

License

MIT

Last publish

Collaborators

  • raprp