-
Add
/rsa/directory inside/echo/. The .pem files live inside thersadir -
Install Dependencies
$ cd echo
$ npm i- Configure Then setup a new .env file with the following properties:
BOT_PATH=./rsa/
BOT_NAME=
BOT_PASSWORD=
BOT_PRIVATE_KEY_PATH=./rsa/
BOT_PRIVATE_KEY_NAME=
BOT_USERNAME=
BOT_EMAIL_ADDRESS=- Start
$ npm start####Query for an answer:
curl "http://localhost:3000/answer?question=Why%20is%20the%20sky%20blue%3F"response (200):
{"key":"life.facts", "question":"Why is the sky blue?","answer":"I dont know"}####Save a question/answer pair:
curl -d '{"key":"life.facts", "question":"Why is the sky blue?", "answer":"I dont know"}' -H "Content-Type: application/json" -X POST http://localhost:3000/saveresponse (201):
{"message":"saved!"}node: v10.13.0 npm: 4.6.1
npm install -g yonpm install -g generator-symphony --clihttps://developers.symphony.com/symphony-developer/docs/symphony-generator
mkdir mybotapp
cd mybotapp
yo symphonyThis was also a good reference: https://developers.symphony.com/symphony-developer/docs/creating-a-room-provisioning-bot-using-nodejs