我的代码在本地运行良好,但是当我在heroku上运行时,我看到错误:
at = error code = H10 desc =“App crashed”method = GET path =“/”host = mystrelle.herokuapp.com request_id = 5874d970-4178-4f51-ad38-62d510d8a047 fwd =“197.211.56.97”dyno = connect = service = status = 503 bytes = protocol = https
var skype = require('botbuilder');
var express = require('express');
var app = express();
var botService = new skype.ChatConnector({
appId: 'da026eab-b762-4ff6-9f01-191d70e37437',
appPassword: 'xxxxxxxxxxxxxxxxxxxx' //// i hid the pass
});
var bot = new skype.UniversalBot(botService);
bot.dialog('/', function (session) {
// body...
if(session.message.text.toLowerCase().indexOf('hi')>=0){
session.send('Hi ' + session.message.user.name +
' thank you for your message: '+session.message.text);
}else{
session.send('Sorry I dont understand you.........');
}
});
app.get('/', function (req, res) {
// body...
res.send('skypeBot listening......');
});
app.listen(process.env.PORT || 3000, function () {
// body...
console.log('skypeBot listening......');
});