Earthquake Event Pages
This application is currently being overhauled to an Angular framework. To view the latest working code prior to this process, please view the master-pre-angular branch.
Alternatively, please review our previous releases.
This project was generated with Angular CLI version 1.6.7.
ng serve for a dev server. Navigate to
The app will automatically reload if you change any of the source files.
ng build to build the project. The build artifacts will be stored in
dist/ directory. Use the
-prod flag for a production build.
Running unit tests
ng test to execute the unit tests via Karma.
Running end-to-end tests
npm run e2e to execute the end-to-end tests via Protractor.
NOTE: this uses
npm runinstead of
ngin order to run using a custom
e2eenvironment, and mock selected api requests for more stable testing data.
The application may be run as a Docker container. A public image is available on Docker Hub at https://hub.docker.com/r/usgs/earthquake-eventpages this can be run most simply with:
$ docker run -p HOST_PORT:80 -d usgs/earthquake-eventpages
HOST_PORT should be replaced with a port on your container host that is
not otherwise being used. One may then access the event pages at:
HOST_PORT should be replaced with the same value used when starting the
EVENT_ID should be the event id for the event you wish to
view, for example "us2000ahv0".
When starting the container, there are several options from the
image that remain available. See https://hub.docker.com/r/usgs/nginx/ for
details on these options.
Additionally, one may specify a custom
BASE_HREF environment variables to
have the container use a different path, for example:
$ docker run -p HOST_PORT:80 -d \ -e BASE_HREF=some/path \ usgs/earthquake-eventpages
It is important to note that the
BASE_HREF should have neither a leading or
trailing slash. Intermediate slashes are acceptable, for example:
One may then access the event pages at:
One may additionally choose to build the image from source. This is facilitated using the included Dockerfile and may be accomplished with:
$ docker build -t IMAGE_NAME:IMAGE_TAG .
One may additionally specify a default
BASE_HREF as a build argument. This
will cause all containers based on the generated image to use the provided
BASE_HREF by default.
$ docker build --build-arg BASE_HREF=some/path
While containers will use the specified value by default, this value may still be overridden at runtime as described above.
To get more help on the Angular CLI use
ng help or go check out the
Angular CLI README.