go>=1.8 node>=v6.9.0 npm>=3.10.10
The server is written in golang.
The golang server returns the static content from
dist/ and proxies a subset of the MDL node API.
As an Angular CLI projects, Node 6.9.0 or higher, together with NPM 3 are required.
After cloning the project, you will need to run
The angular code is compiled to the
Run MDL node
go get github.com/MDLlife/MDL cd $GOPATH/src/github.com/MDLlife/MDL ./run.sh
Run the explorer
This must be run from the same directory that contains
The explorer assumes that the MDL node is running on
localhost:8320 by default.
To point it at a different address:
explorer can be run in api-only mode, which will expose the JSON API but not serve the static content from
$ docker build -t MDLlife/explorer . $ docker run -p 8001:8001 MDLlife/explorer
Access the explorer: http://localhost:8001.
MDL_ADDR and the
EXPLORER_HOST environment variables can be passed
to the running container to modify the default behavior.
After changing the angular frontend, it should be compiled and committed to the repo.
This is to simplify deployment of the application, and allow users to run it themselves without
installing node and npm then running
npm install and
npm run build.
Compiling the angular frontend
explorer.go should be formatted with
goimports. You can do this with:
You must have goimports installed (use
explorer.go to a binary:
Allow it to bind to port 80 using
sudo setcap 'cap_net_bind_service=+ep' ./explorer
Run it on port 80: