From 3654fc832845e8f17ee106633d3dda8a3336f226 Mon Sep 17 00:00:00 2001 From: Nathan Franklin Date: Fri, 18 Oct 2024 23:02:19 +0200 Subject: [PATCH] Hotfix/update README.md about jwt (#274) * Remove outdated JWT need * Update readme * Update readme to reflect that we are only using localhost with react * Refactor backend info --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ff9ea34d..fec9c83e 100644 --- a/README.md +++ b/README.md @@ -4,20 +4,23 @@ Hazmapper is an application for creating, visualizing, and analyzing geospatial See https://github.com/TACC-Cloud/geoapi which is an associated restful API. -## Local React Development (work-in-progress) +## Local React Development -`react/` has the React client +`react/` directory contains the React client To get started, create a local secret file for local development: ``` cp react/src/secret_local.example.ts react/src/secret_local.ts ``` -Get a JWT from someone on WMA-Geospatial subgroup and add the jwt to `react/src/secret_local.ts`. +The `geoapiBackend` setting in `react/src/secret_local.ts` ( see the example [react/src/secret_local.example.ts](react/src/secret_local.example.ts) ) controls which backend `GeoAPI` is used by Hazmapper during local development. You can choose from the following: -The `geoapiBackend` in ( see [react/src/secret_local.example.ts](react/src/secret_local.example.ts) ) can be used to select which backend `geoapi` is used by Hazmapper during local development (e.g. `EnvironmentType.Production`, `EnvironmentType.Staging`, `EnvironmentType.Dev`, * `EnvironmentType.Local` +* `EnvironmentType.Production` +* `EnvironmentType.Staging` +* `EnvironmentType.Dev` +* `EnvironmentType.Local` -See https://github.com/TACC-Cloud/geoapi for more details on running geoapi locally. +To run Hazmapper with the GeoAPI backend locally, configure `geoapiBackend` to use `GeoapiBackendEnvironment.Local` and see the [GeoAPI repository](https://github.com/TACC-Cloud/geoapi) for more detailed instructions. #### Run @@ -26,7 +29,7 @@ npm ci npm run dev ``` -Navigate to `http://localhost:4200/` or `http://hazmapper.local:4200/`. (Note that `hazmapper.local` needs to be added to your `/etc/hosts`) +Navigate to `http://localhost:4200/`. #### Running unit tests