Skip to content

Commit

Permalink
Fix readme (#108)
Browse files Browse the repository at this point in the history
* fix: use GitHub friendly anchor

* fix: add example how to use cors proxy

* fix: describe how to use dotenv
  • Loading branch information
honnix authored Oct 20, 2020
1 parent aee8c82 commit 619e3ec
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ can be installed by running ``yarn`` in the project directory.
Environment variables
======================
Before we can run the server, we need to set up an environment variable or two.
Environment variables can be set either in the current shell or persisted in
``.env`` file stored under the root of the repository.

``ADMIN_API_URL`` (default: `window.location.origin <https://developer.mozilla.org/en-US/docs/Web/API/Window/location>`_)

Expand Down Expand Up @@ -61,7 +63,7 @@ usually not needed, so the default behavior is to run without a prefix.

``CORS_PROXY_PREFIX`` (default: ``/cors_proxy``)

Sets the local endpoint for `CORS request proxying <cors-proxy_>`_.
Sets the local endpoint for `CORS request proxying <cors-proxying_>`_.

===============
Run the server
Expand Down Expand Up @@ -112,7 +114,7 @@ a single module, you can specify that one specifically
(ex. ``localStorage.debug = 'flyte:adminEntity'`` to only see decoded Flyte
Admin API requests).

.. _cors-proxy:
.. _cors-proxying:

==============
CORS Proxying
Expand All @@ -126,7 +128,9 @@ hosting the Admin API on a different domain than the console. Another example is
when fetching execution data from external storage such as S3. This is done to
minimize the amount of extra configuration required for ingress to the Admin API
and data storage, as well as to simplify local development of the console without
the need to grant CORS access to ``localhost``.
the need to grant CORS access to ``localhost``. To proxy requests for local
development, set ``ADMIN_API_URL`` to
``http://localhost:3000/cors_proxy/http://<admin-host>:<admin-port>``.

The requests and responses are piped through the NodeJS server with minimal
overhead. However, it is still recommended to host the Admin API and console on
Expand Down

0 comments on commit 619e3ec

Please sign in to comment.