BotBuilder-Samples/samples/javascript_nodejs/02.echo-bot
Amrit10737726 1330610d8a
modified ftpState from AllAllowed to Disabled (#3981)
2024-06-06 08:56:50 -05:00
..
deploymentScripts Folder name normalizations (#2585) 2020-07-13 15:48:24 -07:00
deploymentTemplates modified ftpState from AllAllowed to Disabled (#3981) 2024-06-06 08:56:50 -05:00
.env [#3526] Add support for MSI to JS samples and generators - bot essentials (part 1/2) (#3551) 2021-11-01 15:03:29 -07:00
.eslintrc.js Linted & updated dependencies for echo and core bots (#2409) 2020-05-21 11:05:18 -07:00
README.md feat: Update Node Samples to SDK 4.20.0 and restify 10.0.0 for Compatibility with Node 18 (#3902) 2023-07-20 11:46:07 -05:00
bot.js Update Samples/Generators to 4.7, add WebSocket support to JS/TS Core, Echo bots (#2086) 2020-01-06 17:09:26 -08:00
index.js R17 Samples (#3807) 2022-08-19 08:45:36 -05:00
package.json JS SDK 4.22.1 (#3941) 2024-02-01 12:45:46 -06:00

README.md

echo-bot

Bot Framework v4 echo bot sample

This bot has been created using Bot Framework, it shows how to create a simple bot that accepts input from the user and echoes it back.

Prerequisites

  • Node.js version 16.16.0 or higher

    # determine node version
    node --version
    

To try this sample

  • Clone the repository

    git clone https://github.com/microsoft/botbuilder-samples.git
    
  • In a terminal, navigate to samples/javascript_nodejs/02.echo-bot

    cd samples/javascript_nodejs/02.echo-bot
    
  • Install modules

    npm install
    
  • Start the bot

    npm start
    

Testing the bot using Bot Framework Emulator

Bot Framework Emulator is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.

  • Install the latest Bot Framework Emulator from here

Connect to the bot using Bot Framework Emulator

  • Launch Bot Framework Emulator
  • File -> Open Bot
  • Enter a Bot URL of http://localhost:3978/api/messages

Interacting with the bot

Enter text in the emulator. The text will be echoed back by the bot.

Deploy the bot to Azure

To learn more about deploying a bot to Azure, see Deploy your bot to Azure for a complete list of deployment instructions.

Further reading