Skip to content

ngowran/sustain-react-quickstart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 

Repository files navigation

Logo

Sustain.Life – Personal Emissions Calculator API ReactJS Quickstart

This quickstart is a guide on how to interact with our API from a ReactJS frontend.

Features

  • Calculates personal carbon emissions based on: utilities, waste, travel, services, what you buy, and more.

Installation

  cd sustain
  npm install 
  npm start

Opens a server on localhost 3000 by default

  http://localhost:3000/

Documentation

Documentation: Must be signed into the developer portal to access.

Screenshots

Home screen

Screenshot

Errors & Fix

401

Error:

  • "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription."

Fix:

  • Make sure to include our API key in the header of your requests. Found in the developer portal.
   { headers: {
    'Ocp-Apim-Subscription-Key': "********"
  }}

Contributing

We accept Pull Requests Special thanks to @ngowran

Licence

The sample code is licensed under MIT.

© 2022 Sustain.Life

About

Repo for Sustain's public API integrations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 96.1%
  • HTML 2.4%
  • CSS 1.5%