mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-29 13:27:44 +00:00
Specific port on webHook server
This commit is contained in:
parent
2598b1dce9
commit
f1f25d84a6
@ -44,13 +44,14 @@ var TelegramBot = function (token, options) {
|
||||
var port = options.webHook.port || 8443;
|
||||
var key = options.webHook.key;
|
||||
var cert = options.webHook.cert;
|
||||
this._configureWebHook(port, key, cert);
|
||||
var host = options.webHook.host;
|
||||
this._configureWebHook(port, host, key, cert);
|
||||
}
|
||||
};
|
||||
|
||||
util.inherits(TelegramBot, EventEmitter);
|
||||
|
||||
TelegramBot.prototype._configureWebHook = function (port, key, cert) {
|
||||
TelegramBot.prototype._configureWebHook = function (port, host, key, cert) {
|
||||
var protocol = 'HTTP';
|
||||
var self = this;
|
||||
|
||||
@ -69,7 +70,7 @@ TelegramBot.prototype._configureWebHook = function (port, key, cert) {
|
||||
});
|
||||
}
|
||||
|
||||
this._webServer.listen(port, function () {
|
||||
this._webServer.listen(port, host, function () {
|
||||
console.log(protocol+" WebHook listening on:", port);
|
||||
});
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user