upswyng icon indicating copy to clipboard operation
upswyng copied to clipboard

[web] Clean up Api server env vars

Open rhinodavid opened this issue 5 years ago • 0 comments

I noticed at least one instance where a component (useTemperature.tsx) is referencing the Server URI:

Screen Shot 2020-05-09 at 4 00 17 PM

We should scrub the package and figure out a way to not have individual components reference this URI, especially with a hardcoded default. It's subject to breakage with changes. One solution would be to have a module that pulls in env vars and sets defaults if necessary, then components import values from that module. Finishing #271 would be very helpful.

Also, note that once #357 lands the client will be on the same server as the API in production so the default should reflect that.

rhinodavid avatar May 09 '20 22:05 rhinodavid