Esri / nearby-javascript

ArcGIS API for JavaScript app to find places nearby and route to the nearest location.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consolidate environment vars

andygup opened this issue · comments

commented

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:

  • DEFAULT_WORKER_URL
  • portalUrl
  • geocodeURL

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.

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.

commented

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