An open API service indexing awesome lists of open source software.

https://github.com/blackspherefollower/script-store


https://github.com/blackspherefollower/script-store

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

![Dependencies](https://david-dm.org/rafaelrpinto/aws-lambda-stateful-express-boilerplate.svg) ![NPM Downloads](https://img.shields.io/npm/dt/aws-lambda-stateful-express-boilerplate.svg) ![NPM version](https://img.shields.io/npm/v/aws-lambda-stateful-express-boilerplate.svg) [![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.png?v=103)](https://github.com/ellerbrock/open-source-badges/) ![retire](https://img.shields.io/badge/Retire%20at%2035yo-failing-red.svg)

### Overview

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 (or with [mozilla's client-session](https://github.com/rafaelrpinto/aws-lambda-stateful-express-boilerplate/tree/client-session))
- 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

If you are loking for a native serverless boilerplate check [this project](https://github.com/rafaelrpinto/serverless-boilerplate).

### Running locally

Start a local DynamoDB on port **8000** as [described here](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html) or as a [Docker container](https://hub.docker.com/r/cnadiminti/dynamodb-local/). Then run:

`yarn start`

Then access the application on [https://localhost:8443](https://localhost:8443).

### Deploying to AWS

Setup AWS cli as [described here](https://docs.aws.amazon.com/lambda/latest/dg/setup.html).

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`