Git Product home page Git Product logo

item-viewer-backend's Introduction

Item Viewer backend

This is the backend for the Item Viewer demo application. It is a Lambda function that takes requests from the frontend, calls the Real Item API using an API key, and returns the results to the frontend.

You can check out the frontend part here:
https://github.com/realitems/item-viewer-frontend

Usage

This project was built using AWS SAM. If you don't use SAM, or you just want to see the code, you can find it in /lambdas/proxy/index.js.

AWS SAM

If using SAM, set your S3 bucket in samconfig.toml and run the following commands to deploy:

sam build
sam deploy

Debugging

To debug using VSCode, you can use the launch.json file in the .vscode folder. You need to have the AWS Toolkit extension installed for VSCode. In the launch.json file, make sure to set the API_KEY and CONTRACT_ID environment variables.

In launch.json, you can change the payload.path value to test different functions.

Warning: Do not commit your API key.

Notes

If you are deploying to AWS:

  • It is recommended to use Secrets Manager to store your API key.
  • Make sure to implement some type of authentication for the Lambda function URL.

item-viewer-backend's People

Contributors

rocky-m avatar

Watchers

Ken Woodruff avatar David Menard avatar Tomás Nunes 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.