Reputation: 840
everyone I try to follow the tutorial to build my first bot.
But when I use Bot Framework Emulator to connect it, It don't show Hello World on Emulator.
And when I send some thing word(like 'test' or 'P') to server, It crash can show me
Error: connect ECONNREFUSED 127.0.0.1:5631
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
how can i fix it?
Upvotes: 0
Views: 292
Reputation: 840
Finally, I use ngrok to connect my local applicaion. I don't know why I can't connect it without ngrok. But It just can work, Thanks everyone ^^
Upvotes: 1
Reputation: 2887
You fill in the right values under the following section:
var connector = new builder.ChatConnector({
appId: process.env.MICROSOFT_APP_ID,
appPassword: process.env.MICROSOFT_APP_PASSWORD
});
MICROSOFT_APP_ID and MICROSOFT_APP_PASSWORD should be 'undefined' or filled properly by registering a new bot under: Microsoft Bot Framework
Also, I see that you are trying to connect using port 5631 instead of 3986 - Make sure to check the right port is set when creating the server:
server.listen(process.env.port || process.env.PORT || 3978, function () {
console.log('%s listening to %s', server.name, server.url);
});
Upvotes: 0