getCarbon
gets the carbon reduction estimate and the total distance travelled.
This can be computationally expensive so the value is cached in the store for 5 minutes.
app.get('/carbon/estimate', async (req, res) => {
res.send(
await carbonRoutes.getCarbon()
)
})
Generated using TypeDoc
CarbonRoutes
provides routes for retrieving the carbon reduction estimate. It requires a json file at RESOURCE_CARBON_LOCATIONS in resources, it should be an array of CountryLocationStruct