Developing Chat Bot using node.js on Windows 10 with Microsoft Bot Framework

Here we will setup the BOT builder SDK for node.js on Windows 10.


Step 1: Create a folder


Step 2: Open command prompt with folder path.

Step 3: Create package.json file using npm.init

C:\Users\SARTHAK\Desktop\BOT>npm init

Enter the project details as shown below:


Step 4: Install Microsoft Bot Builder SDK package

npm install –save botbuilder

Step 5: Install restify

npm install –save restify

Restify is the Node.js web service framework.

Step 6: Download and Install BotFramework-Emulator


Install the .exe file,

Screenshot (52)

Step 7: Create an app.js file in your folder

Add the following code:

<div>var restify = require('restify');</div>
<div>var builder = require('botbuilder');</div>
<div>var server = restify.createServer();</div>
<div>server.listen(process.env.port || process.env.PORT || 3978, function () {</div>
<div>console.log('%s listening to %s',, server.url);</div>
<div>var connector = new builder.ChatConnector({</div>
<div>'/api/messages', connector.listen());</div>
<div>var bot = new builder.UniversalBot(connector, function (session) {</div>
<div>session.send("You said: %s", session.message.text);</div>

Your setup should look like below:


Step 8: Run your app.js file

node app.js

Step 9: Open the BotFramework-Emulator and enter the default endpoint url that your BOT listens to.

(Ignore the Microsoft App ID and Password if you don’t have one)


Like shown in the image below, say hi



Your Microsoft BOT Builder SDK is ready setup on local Windows 10 machine is ready.

Read official docs from Microsoft here: Bot Service Documentation

For Getting Started with BOTs on Azure Check other blogs here:


One thought on “Developing Chat Bot using node.js on Windows 10 with Microsoft Bot Framework

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s