Serverless Stack is a free comprehensive guide to creating full-stack serverless applications. We create a note taking app from scratch.
The main part of the guide uses SST. We also have an alternative version that uses Serverless Framework. This repo is the source for the Serverless Framework version of the backend. There's a frontend React client that connects to this as well.
To use this repo locally you need to have the Serverless framework installed.
$ npm install serverless -g
Clone this repo and install the NPM packages.
$ git clone https://github.com/AnomalyInnovations/serverless-stack-demo-api
$ npm install
Run a single API on local.
$ serverless invoke local --function list --path event.json
Where, event.json
contains the request event info and looks something like this.
{
"requestContext": {
"authorizer": {
"claims": {
"sub": "USER-SUB-1234"
}
}
}
}
Finally, run this to deploy to your AWS account.
$ serverless deploy
This project refers to an .env
file for secret environment variables that are not checking in to the repo. Make sure to create one before deploying - https://serverless-stack.com/chapters/load-secrets-from-env.html.
This repo is maintained by Anomaly Innovations; makers of Seed and Serverless Stack.