-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Frontend
Develop: You need npm
, install dependencies using npm install
.
You can then do npm start
to run a static file server at port 3000 that
watches the source files. A separate mock backend process also needs to be
started to handle all backend API requests. This can be started in a separate
shell by running npm run mock:api
. The mock backend includes some sample
data to showcase many of the UI interactions.
Production Build:
You can do npm run build
to build the frontend code for production, which
creates a ./build directory with the minified bundle. You can test this bundle
using server/server.js
(first build the server by running npm run build
inside the server directory. Note you need to have an API server running, which
you can then feed its address (host + port) as environment variables into
server.js
. See the usage instructions in that file for more.
Container Build:
You can also do npm run docker
if you have Docker installed to build an
image containing the production bundle and the server pieces. In order to run
this image, you'll need to port forward 3000, and pass the environment
variables ML_PIPELINE_SERVICE_HOST
and
ML_PIPELINE_SERVICE_PORT
with the details of the API server, which
you can run using npm run mock:api
separately.