Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Add configuration for preview webserver #160

Merged
merged 11 commits into from
Mar 5, 2021
Merged

Conversation

pestevez
Copy link
Contributor

@pestevez pestevez commented Mar 4, 2021

This PR adds support to configure the use of the preview webserver.

Here is a summary of the changes:

  • Add dotenv package to load environment variables from a file.
  • Added three variables to config the webserver:
    • One to define if the local webserver should be started. It is expected to be false when using a remote webserver.
    • One to define the host (actually, it is the protocal and hostname) of the remote webserver.
    • One to define the port of the remote webserver.
  • Refactored the logic to start and stop the webserver to handle the config based on the new variables.
  • Updated Preview React component to remove the hardcoded local webserver URL and replace it with the configurable one.
  • Added a Dockerfile that can be used to run a Docker container with a preview webserver.
  • Updated the Readme file with instructions to configure the webserver.

Note: still need to figure out why flow is failing.

Fixes #159.

@pestevez pestevez changed the title [WIP] Add configuration for preview webserver Add configuration for preview webserver Mar 4, 2021
@pestevez
Copy link
Contributor Author

pestevez commented Mar 4, 2021

Thanks @nataliemt for figuring out the issue with flow!

@pestevez pestevez requested a review from nataliemt March 4, 2021 15:11
@pestevez pestevez force-pushed the feature/config-webserver branch from 8999112 to 1c98f70 Compare March 5, 2021 16:59
@pestevez
Copy link
Contributor Author

pestevez commented Mar 5, 2021

@nataliemt should be good to go now!

@nataliemt
Copy link
Contributor

It looks great @pestevez, thanks!

@pestevez pestevez merged commit 9055b1e into master Mar 5, 2021
@pestevez pestevez deleted the feature/config-webserver branch March 5, 2021 18:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support customization of preview webserver
3 participants