Giter Club home page Giter Club logo

momento-serverless-tutorial's Introduction

Adding a cache to a serverless application

This is the code repository for a tutorial on adding a cache to a serverless application. Be sure to refer to that tutorial to walk through the steps of deploying a serverless application, then adding caching to improve the performance of your application.

Most of the details of the application are explained in the tutorial. However, you can use this repository to take a deeper look at some of the code aspects that are not discussed in depth in the tutorial.

Specifically, look at the following areas for additional detail:

Deploying

To deploy this service, you must have the Serverless Framework installed. You can install it with the following command:

npm install -g serverless

You will also need to have AWS credentials available in your environment. See here to see how to set up your credentials.

Once you have configured your environment, you can deploy the application using the following command:

serverless deploy

The Serverless Framework will build and deploy your application to AWS. Following the deploy, you should see output indicating the URL endpoints that can be used to access your application:

โœ” Service deployed to stack momento-serverless-tutorial-dev (58s)

endpoints:
  POST - https://${apiId}.execute-api.us-east-1.amazonaws.com/dev/users
  POST - https://${apiId}.execute-api.us-east-1.amazonaws.com/dev/organizations
  POST - https://${apiId}.execute-api.us-east-1.amazonaws.com/dev/organizations/{organization}/members
  GET - https://${apiId}.execute-api.us-east-1.amazonaws.com/dev/organizations/{organization}/members/{username}
functions:
  createUser: momento-serverless-tutorial-dev-createUser (21 kB)
  createOrganization: momento-serverless-tutorial-dev-createOrganization (21 kB)
  addUserToOrganization: momento-serverless-tutorial-dev-addUserToOrganization (21 kB)
  userInOrganization: momento-serverless-tutorial-dev-userInOrganization (21 kB)

Check out the tutorial to see how to exercise these endpoints.

In the collections/ directory, there are exported collections for both Postman and Insomnia. For each, be sure to set the endpoint variable in your environment to the base URL for your API.

momento-serverless-tutorial's People

Contributors

alexdebrie avatar ssugimoto avatar eaddingtonwhite avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.