Answer the question
In order to leave comments, you need to log in
Where can I set the port for Telegram bot on Heroku on Node.js?
I run the bot through
Heroku
process.env["NTBA_FIX_319"] = 1
process.env['TELEGRAM_API_TOKEN'] = '***********************************'
const TelegramBot = require('node-telegram-bot-api')
console.log('------------------------------------------------------------------------------')
const bot = new TelegramBot(process.env.TELEGRAM_API_TOKEN, {polling: true})
console.log("bot created")
heroku logs --tailin logs
2018-10-07T09:56:25.925072+00:00 app[web.1]: ------------------------------ ------------------------------------------------
2018- 10-07T09:56:25.946602+00:00 app[web.1]: bot created
2018-10-07T09:57:23.441280+00:00 heroku[web.1]: State changed from starting to crashed
2018-10- 07T09:57:23.301362+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2018-10-07T09:57:23.301448+00:00 heroku[web.1]: Stopping process with SIGKILL
2018-10-07T09:57:23.424562+00:00 heroku[web.1]: Process exited with status 137
2018-10-07T09:57:25.845487+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=whm-bot.herokuapp.com request_id=a401c875 -814f-477e-a9a4-799ec0c512cd fwd="178.214.254.226" dyno= connect= service= status=503 bytes= protocol=https
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question