keymanapp / shared-sites

Shared code across keyman.com sites
MIT License
0 stars 0 forks source link

chore: refactor KeymanHosts #13

Open mcdurdin opened 4 months ago

mcdurdin commented 4 months ago

KeymanHosts is currently overly complex. However there are a number of challenges around determining which URLs to be using by various parts of the sites -- for example handling overrides for development (as we may not want to be running e.g. api.keyman.com locally).

  1. Use a table-based structure rather than constructing URLs, so that we have explicit references to each tier's possible URLs.
  2. Allow for overrides on DEVELOPMENT tier from a localenv.php? file
  3. Use the same table to generate javascript constants for scripts -- and always use the constants and don't guess
  4. Ensure TIER_TEST overrides.
mcdurdin commented 4 months ago

Also, refactor environment getenv() calls into module so we have a single global KeymanSiteEnvironment class

mcdurdin commented 4 months ago

Future: let users choose which sites they want to host locally, and munge internal links accordingly

darcywong00 commented 4 months ago

Future: let users choose which sites they want to host locally, and munge internal links accordingly

See impact to https://github.com/keymanapp/website-local-proxy