CDCgov / prime-central

Apache License 2.0
9 stars 2 forks source link

Frontend: Support relative paths site wide #143

Closed pete-gov closed 3 years ago

pete-gov commented 3 years ago

To deploy using URL path routing, the entire app will need to be able to run out of any root directory (such as /app/). It is currently wired up with what appears to be a number of absolute links in various files which prevents it from running in a relative root.

Acceptance Requirements:

Verify site can be deployed and run entirely from any subdirectory (such as /dev/test/app)

pete-gov commented 3 years ago

Easiest way to test this in Azure:

  1. Set up Azure CLI if you don't have it set up yet.
  2. Run npm run deploy-azure-dev
  3. See if this works: https://cdc.simplereport.org/dev/app
  4. Run npm run deploy-azure-prod
  5. See if this works: https://cdc.simplereort.org/app
nickrobison-usds commented 3 years ago

I'll give this one a shot, and when I fail, I pass it along!

pete-gov commented 3 years ago

This was fixed by adding some environment variables to the package.json for the build scripts.