Skip to content
Snippets Groups Projects
Commit 7be6a472 authored by Powers, Peter M.'s avatar Powers, Peter M.
Browse files

build run edits

parent 6a07b4bb
No related branches found
No related tags found
2 merge requests!705Production Release | nshmp-haz,!697Doc edits
......@@ -38,17 +38,18 @@ To run *nshmp-haz* web services:
```bash
./gradlew run
# or './gradlew run -t' to recompile and relaunch when code changes
```
By default, when the web services start up, they load the 2018 NSHM for the conterminous U.S.
To use a different model run the web services using Java and specify model path:
```bash
./gradlew assemble
java -jar build/libs/nshmp-haz.jar --model=path/to/model
```
After startup, web services and documentation are now available at
[http://localhost:8080/](http://localhost:8080/).
After startup, web services and documentation are available at <http://localhost:8080/>.
See the [Matlab](../../etc/matlab) directory for examples of how to call the web services. To
run the ground motion model (GMM) web services, please use the
......@@ -89,6 +90,32 @@ Disaggregations build on and output `HazardCalc` results along with other disagg
files. Disaggregations also have some independent
[configuration](./Calculation-Configuration.md#calculation-configuration-parameters) options.
## Customizing Code
Whereas *nshmp-haz* contains code to run command line applications and web services, model
loading and hazard calculations are handled in the dependent library
[*nshmp-lib*](https://code.usgs.gov/ghsc/nshmp/nshmp-lib). To use a local, modified version of
*nshmp-lib*, set an environment variable `NSHMP_LIB_LOCAL=true` and *nshmp-haz*
will look for *nshmp-lib* in a directory adjacent to *nshmp-haz*. If *nshmp-lib* is located
somewhere else, modify the path specified in
[`gradle/dependencies.gradle`](../../gradle/dependencies.gradle). When using a local version
of *nshmp-lib*, first build the *nshmp-lib* project using `./gradlew fatJar` so that
required dependencies are included.
Summary of steps to check out and start running code for local development:
```bash
# --> Set a NSHMP_LIB_LOCAL=true environment variable on your system
cd yourProjectDirectory
git clone https://code.usgs.gov/ghsc/nshmp/nshmp-lib.git
cd nshmp-lib
./gradlew fatJar
cd ..
git clone https://code.usgs.gov/ghsc/nshmp/nshmp-ws.git
cd nshmp-ws
./gradlew run
```
---
## Related Pages
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment