Skip to content

Commit

Permalink
Hotfix/update README.md about jwt (#274)
Browse files Browse the repository at this point in the history
* Remove outdated JWT need

* Update readme

* Update readme to reflect that we are only using localhost with react

* Refactor backend info
  • Loading branch information
nathanfranklin authored Oct 18, 2024
1 parent 1979ebf commit 3654fc8
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 3654fc8

Please sign in to comment.