RedHatInsights / insights-chrome

Chroming for Insights apps
MIT License
27 stars 130 forks source link

Update documentation on how to run with local services #2871

Closed randomnetcat closed 2 months ago

randomnetcat commented 2 months ago

The documented instructions do happen to work for running Advisor (not sure why?) but I could not convince them to work with other applications (I tested learning-resources and registration-assistant). They result in the error:

Registration is not running or available via http://stage.foo.redhat.com:8004

Make sure to run `npm run start -- --port=8004` in the registration application directory to start it's webpack dev server and the bundle is built.

Based on the static script in learning-resources, I found that npx fec static --port=NNNN did work for all repositories.

Also, I found that the separator between the port and protocol is documented incorrectly; that is fixed here.

bastilian commented 2 months ago

@randomnetcat The -- --port=0909 behaviour is broke atm. However, it will be fixed as soon as this PR is merged: https://github.com/RedHatInsights/frontend-components/pull/2007

Then the documentation should again be valid.

What you can do meanwhile is to add a port prop with the desired port to the fec.config.js. The part with LOCAL_APPS is still valid and should work as expected.

randomnetcat commented 2 months ago

The -- --port=0909 behaviour is broke atm. However, it will be fixed as soon as this PR is merged: https://github.com/RedHatInsights/frontend-components/pull/2007

Ah, thank you, sorry.

The part with LOCAL_APPS is still valid and should work as expected.

The example happens to work because the protocol it attempts to specify is http, and that's already the default. See https://github.com/RedHatInsights/frontend-components/blob/fc61adcd088fe25997c36b8ef799f37dd7691739/packages/config-utils/src/proxy.ts#L70-L72

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 63.25%. Comparing base (9b05c69) to head (4478e9b).

:exclamation: Current head 4478e9b differs from pull request most recent head 258dfb0

Please upload reports for the commit 258dfb0 to get more accurate results.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2871/graphs/tree.svg?width=650&height=150&src=pr&token=GuRwyW1uUf&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights)](https://app.codecov.io/gh/RedHatInsights/insights-chrome/pull/2871?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=RedHatInsights) ```diff @@ Coverage Diff @@ ## master #2871 +/- ## ======================================= Coverage 63.25% 63.25% ======================================= Files 211 211 Lines 4665 4665 Branches 858 858 ======================================= Hits 2951 2951 Misses 1703 1703 Partials 11 11 ```