Esri / nearby-javascript

ArcGIS API for JavaScript app to find places nearby and route to the nearest location.
Apache License 2.0
41 stars 24 forks source link

Consolidate environment vars #17

Closed andygup closed 5 years ago

andygup commented 5 years ago

Seems like it would be more consistent and cleaner to consolidate all the configuration variables in one place under /env. My suggestion is to have the developement.env and production.env files already created.

Add the following to both .env files:

ARCGIS_APP_ID=THISisMYdevelopmentID

And, move the following from config.ts and make them environment vars as well:

odoe commented 5 years ago

Environment variables are only supposed to be for sensitive information, like an application ID that can be used in development or production. It is not intended for URLs. I can the add the empty env files. I just thought it would confuse people even further.

odoe commented 5 years ago

Actually, I won't be adding empty env files because it breaks local development and puts at risk of someone publishing sensitive information to github. env files are not intended to be added to a repo.

andygup commented 5 years ago

Yeh, I get the accidentally publishing sensitive information. What about a configuration file?