提交 d539214c 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

make heroku happy by listen on PORT

上级 d583b12c
{
"name": "Wechaty Cloud Bot for IO",
"description": "Wechat for Bot. Get your own cloud bot by deploy me on https://wechaty.io",
"description": "Wechat for Bot. Get your own cloud bot by deploy me",
"repository": "https://github.com/zixia/wechaty",
"logo": "https://raw.githubusercontent.com/zixia/wechaty/master/image/wechaty-icon.png",
"keywords": ["wechaty", "wechat", "bot", "chatbot", "framework", "cloudbot"],
......
......@@ -44,4 +44,19 @@ bot.init()
log.error('Bot', 'init() fail: %s', e)
bot.quit()
process.exit(-1)
})
/**
*
* To make heroku happy
*
*/
const app = require('express')()
app.get('/', function (req, res) {
res.send('Wechaty Deployed on Heroku Succeed!')
})
app.listen(process.env.PORT, function () {
console.log('Wechaty IO Bot listening on port ' + process.env.PORT + '!')
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册