Microsoft provides its Bot framework to build smart chat bots.
It provides the Bot Builder SDK in two languages i.e Node.js and C#.
Azure provides us the setup of developing the web app bot on cloud with integrated web-chat channel and integrated online VScode editor.
The bot on Azure is deployed on Azure Web server and can accessed over the restify service.
Now we can also develop the bot over local machine also using the Bot Builder SDK and testing the bot service using the bot emulator running on localhost.
Download from here: Bot Emulator
You can use the emulator to connect to your bot remotely once deployed any where else other than azure (like EC2 or IIS ).
The only difference between testing it locally and remotely is;
- Your app Id and password need to be populated in the emulator.
- Your bot URL should be changed in the emulator to the remote endpoint URL.
The Bot Framework requires that the x.509v3 certificate exposed by your endpoint be current and valid. Your cert must chain to a root certificate authority trusted by Microsoft.
You can also use ngrok to create a secure tunnel to your bot’s localhost environment and test the bot in your channel before exposing it to other users. Also you don’t need to Publish your bot in the Bot Framework portal, just register it. Publishing of bot is just for it to appear in the Bot Directory.