Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented replacement of localstack with localhost to load localstack images in browser #165

Merged
merged 3 commits into from
Dec 9, 2020

Conversation

leothomas
Copy link
Contributor

What I'm changing:

I added a check to see if the app is running in a dev environment and if so replace localstack with localhost in all image src urls.

See this comment detailing why this is necessary

How I did it:

  • Check process.node.NODE_ENV for development
  • String replacement in src url

How you can test it:

  • Pull the backend (nasa-apt and run docker-compose up --build)
  • Pull the front end and run nvm install && yarn install && yarn start

Verify the test-atbd-1 loads an image of the full moon (in the webpage) and that the image is also present in the generated pdf.

@danielfdsilva danielfdsilva self-requested a review December 9, 2020 15:59
Copy link
Contributor

@danielfdsilva danielfdsilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great solution @leothomas

Copy link
Contributor

@danielfdsilva danielfdsilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hit that approve to soon

src/components/atbds/View.js Outdated Show resolved Hide resolved
Co-authored-by: Daniel da Silva <[email protected]>
@leothomas leothomas merged commit 5aea711 into develop Dec 9, 2020
@leothomas leothomas deleted the bugfix/browser-loading-localstack-images branch December 9, 2020 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants