This document shows how to run the watson-discovery-food-reviews
application on your local machine.
- From the home directory of your cloned local repo, create a .env file by copying it from the sample version.
cp env.sample .env
- Edit the .env file with the necessary settings.
# Copy this file to .env and replace the credentials with
# your own before starting the app.
# Watson Discovery
DISCOVERY_URL=<add_discovery_url>
DISCOVERY_IAM_APIKEY=<add_discovery_iam_apikey>
DISCOVERY_ENVIRONMENT_ID=<add_discovery_environment_id>
DISCOVERY_COLLECTION_ID=<add_discovery_collection_id>
# Watson Knowledge Studio
WKS_MODEL_ID=<add_wks_model_id>
# Run locally on a non-default port (default is 3000)
# PORT=3000
- Install Node.js runtime or NPM.
- Start the app by running
npm install
, followed bynpm start
. If running for the first time, please be patient as the initialization process needs to load 1000 json files into your Watson Discovery Collection and may take several minutes. - Access the UI by pointing your browser at
localhost:3000
.
Note:
PORT
can be configured in the .env file.