Serverless Stack Demo Api Save

Source for the demo app API in the Serverless Stack Guide

Project README

Serverless Stack Demo API Seed Status

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.

Usage

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.

Open Source Agenda is not affiliated with "Serverless Stack Demo Api" Project. README Source: AnomalyInnovations/serverless-stack-demo-api
Stars
520
Open Issues
16
Last Commit
2 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating