This is a demo outlining how you can use Metarank in real-world scenarios. The code showcases how you can utilize deployed Metarank instance in your web application and covers ranking results, sending feedback and analyzing response.
The demo project utilizes Node.js for the backend and ReactJS for the frontend, so you must have Node.js installed in order to run the project.
We also use Yarn for package management (npm i -g yarn
for quick install).
You can easily run the project with docker-compose
:
- run
docker-compose build
to build the images - run
METARANK_URL=SOME-URL MODEL_NAME=SOME-MODEL docker-compose up
to run the images
You can access the frontend application at localhost:3000
when both containers are running.
Both frontend and api projects are wrapped in yarn workspace, so you can run both projects using one yarn command.
- run
yarn
in the project folder to install all dependencies - run
npm run start
to start both projects simultaniously
You still need to provide the METARANK_URL
environment variable, e.g. METARANK_URL=http://localhost:8080 npm run start
cd frontend && npm i
cd server && npm i
- use
METARANK_URL
environment variable to provide the URL of your Metarank installation in the formathttp://localhost:8080
- use
MODEL_NAME
environment variable to specify the name of the Metarank model from your configuration file. By default it'sxgboost
as in the Ranklens Demo - use
PORT
environment vvaraible to provide the port on which API will run. By default port 3001 is used cd server && npm run start
to run application
cd frontend && npm run start
. By default the frontend will run on port 3000