Brightspace / frau-local-appresolver

A free-range-app utility for resolving locally hosted apps.
Apache License 2.0
0 stars 4 forks source link

Add baseRoute config to control whether we add /app/ to routes #35

Closed imcdonald-d2l closed 3 years ago

imcdonald-d2l commented 3 years ago

Adding this config allows us to control whether we add /app/ to endpoint routes. This is useful for using tools such as es-dev-server where we want index.html hosted at http://localhost:3000/index.html instead of http://localhost:3000/app/index.html. Since es-dev-server hosts files without actually building anything it is important that endpoint in appconfig.json points to the proper location of index.html.

Specifically, frau-appconfig-builder looks for an environment variable to determine if it’s running in CI or locally. If it’s running locally then it calls into frau-local-appresolver to get the URL which appends /app/. To fix this I added a parameter to control whether we add it while defaulting it to true so it functions as expected with all existing setups.

imcdonald-d2l commented 3 years ago

Also, any ideas on why this test might be failing? I didn't make any changes to this area so not sure what changed 🤔

image

EDIT: deleted failing test.