Clone the source code repository and run it
- Clone the source code by using the .branch
project-skeleton
.
git clone –b project-skeleton
https://github.com/cdimascio/nationalparks_conversation
cd nationalparks_conversation
nationalparks_conversation
as the project root.
Tip: To see the compete working code, switch to themaster
branch by running the following command:git checkout master
.
Rungit checkout project-skeleton
to switch back. - Import the conversation to Watson Conversation tooling. Click the Import button to import the workspace file located in the project root at
resources/conversation_workspace.json
. This file is located in the repository that you cloned in step 1.
- If you haven’t done so already, record your workspace ID from the Watson Conversation tooling page.
- If you haven’t done so already, record your service credentials (username and password) from the Service Credentials page.
- Be sure that you are in the project root folder and then update the .
env
file with your service credentials and workspace ID. For example, add these values to the .env
file:
WATSON_CONVERSATION_API_ROOT=https://gateway.watsonplatform.net/conversation/api
WATSON_CONVERSATION_USERNAME=XXXXXXXXX
WATSON_CONVERSATION_PASSWORD= XXXXXXXXX
WATSON_CONVERSATION_WORKSPACE_ID= XXXXXXXXX - Install dependencies by running the following commands:
npm install
cd client
npm install
cd . . - Run the application by entering these commands:
npm start
cd client
npm start - Test the application by navigating to http://localhost:3000. Then, enter some text such as
Show me a list of parks
.
Note: Some functionality will not work until you complete this lab.