SawtoothExplorer is an application that provides visibility into the Sawtooth Blockchain for Node Operators.
Before starting the SawtoothExplorer app, have the API running locally. Instructions for doing so are available in the Sawtooth documentation, under Installing and Running Sawtooth.
Once this is up and running, start the explorer container and rest api proxy
By default, the sawtooth API proxy is available at port
apiUrl is already set to
http://localhost:8090. To change where the
explorer connects to the rest api, change the value of
The minified and compiled web assets are also served at
explorer container is where you'll perform most development related
functions, the container starts in serve mode, which will auto load changes. To
connect to the container to perform builds and other functions:
docker exec -it sawtooth-explorer /bin/bash
ng generate component component-name to generate a new component. You can
ng generate directive|pipe|service|class|module. More information
can be found on the Angular CLI github page.
Run these commands inside of the explorer container.
ng build to build the project. The build artifacts will be stored in the
dist/ directory. Use the
-prod flag for a production build. These files must
be served through a web server such as nginx.
Running unit tests
To run a single spec or test, update the spec from
ffit respectively to run Jasmine in
focused spec mode.
To generate a report on code coverage, run
ng test --code-coverage. The
report will be generated in the
/coverage directory. To view, open the
index.html page in a browser.
Running end-to-end tests
ng e2e to execute the end-to-end tests via
Protractor. Before running the tests make
sure you are serving the app via