electricitymaps / bloom-contrib

Making carbon footprint data available to everyone.
https://www.bloomclimate.com
MIT License
434 stars 104 forks source link

Need clarification: Are integration running in a browser or in Node.JS? #356

Closed steren closed 4 years ago

steren commented 4 years ago

The README should clearly state the environment under which integrations are running.

First, it's JS.

But also, do they run on mobile client in a browser context? on the client in a JS execution environment? server-side in Node.js? Can any NPM package be used (even the ones using native code?)

Clarifying this upfront will help developer select which tool they can use.

corradio commented 4 years ago

You're right we should clarify that. On mobile it runs under React-Native, which can mean different things depending on the platform. In principle node code works, but not always :/ For example, the fetch API is implemented differently on Android and iOS (and differently than node and browser as well). One example is that it doesn't handle setting custom cookies. I'm not sure how to best express that in the README, but we should address this somehow.

corradio commented 4 years ago

Closing this due to inactivity.