Tuesday, March 2Digital Marketing Journals

nodejs

Getting started with the Relay SDK | by Ibraheem Khalifa | Feb, 2021
best chatbot, chatbot, chatbot app, chatbot online, chatbot website, conversational-ui, creating chatbots, heroku, nodejs, programming, robot chat, voice-assistant

Getting started with the Relay SDK | by Ibraheem Khalifa | Feb, 2021

Hey folks! Let’s get started with a quick example showing how you can use the Relay node.js SDK to create a simple number game. For this example, we’ll use Heroku to host a Websocket that will maintain a connection with the Relay Server.First, create a new app using Heroku. We’ll be naming ours ‘relay-wf’:Next, let’s setup our environment with git and Heroku CLI (instructions for windows/linux):$ brew tap heroku/brew && brew install heroku$ heroku loginNext, let’s initialize our environment:$ cd relay-wf$ git init$ npm init$ npm install relay-jsNext, we’ll setup our example interaction & deploy it to heroku. Here we are creating a basic app that let’s users guess two numbers and returns the one who guest closestimport relay from 'relay-js'const app = relay()app.workflow(`num...