将我的Node JS应用程序部署到Heroku时出错

时间:2017-10-22 08:51:22

标签: javascript node.js heroku

我的代码在本地运行良好,但是当我在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......');
});

0 个答案:

没有答案