serverless-stack-demo-api

by AnomalyInnovations

AnomalyInnovations /serverless-stack-demo-api

Source for the demo app API in Serverless-Stack.com

448 Stars 183 Forks Last release: 6 months ago (v4.1) MIT License 187 Commits 14 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Serverless Stack Demo API

Serverless Stack is a free comprehensive guide to creating full-stack serverless applications. We create a note taking app from scratch.

This repo is for the serverless backend API that we build over the course of the tutorial. You can find the repo for the frontend React app here. And the repo for the tutorial here.

Steps

To support the different chapters and steps of the tutorial; we use branches to represent the project codebase at the various points. Here is an index of the various chapters and branches in order.

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 dpeloying - https://serverless-stack.com/chapters/load-secrets-from-env.html.

This repo is maintained by Anomaly Innovations; makers of Seed and Serverless Stack.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.