2
votes

I have created a bot using Microsoft bot framework (NodeJs) , it working fine on local system. When i deployed with azure functions then also its working fine.

But i'm trying to deploy in some other way like

1) I want to register my bot on azure 
2) but want to host somewhere else(SSL Certified server) i.e not on azure (don't want to use azure bot functions) 

I have followed the steps got in some articles

enter image description here

My App.js Looks like this

enter image description here

But i'm getting below error when i tried to test with "Test in web Chat"

enter image description here

Can anyone please help me, what i'm doing wrong here ??

Thanks

1
It's listening on port 80 when deployed to App Service. Just remove the port from your Messaging Endpoint definition and it should start talking back to you.evilSnobu
oh, my bad, it's NOT on Azure. make sure you have a valid TLS certificate on that 3978/TCP endpoint then. Won't work with self signed stuff.evilSnobu
have valid certificate on 443 port , & tried to run on that port as mentioned in one of the articles , still its giving error when i fire node app.js it give below error Error: listen EADDRINUSE :::80 for 80 port & Error: listen EADDRINUSE :::443 for 443 port , please helpStack Account
You have provided zero information about your hosting environment, not sure what you expect from us. The error message is pretty clear, there's another web server running on that machine/instance/whatever-that-isevilSnobu

1 Answers

1
votes

Not familiar with AWS, but for making restify server support HTTPS, you can try to use:

const restify = require('restify');
const fs = require('fs');

const https_options = {
    key: fs.readFileSync('./localhost_3978.key'), //on current folder
    certificate: fs.readFileSync('./localhost_3978.cert')
};

server = restify.createServer(https_options);

Create the restify server with your SSL certificate and key files before your bot application.