Closed rmnblm closed 7 years ago
Might be resolved with PR https://github.com/Naltox/telegram-node-bot/pull/98
I solved the problem by using a Procfile
with the following content:
worker: node index.js
I did also run the following command
$ heroku scale web=0 worker=1
Watch out. This doesn't work on a free dyno.
The below steps resolved my solution:
Editing package.json as:
... "engines": { "node": "5.0.0", "npm": "4.6.1" }, ...
and Server.js as:
... var port = process.env.PORT || 3000; app.listen(port, "0.0.0.0", function() { console.log("Listening on Port 3000"); }); ...
Thank you. This worked for me 100%.
var port = process.env.PORT || 3000; app.listen(port, "0.0.0.0", function() { console.log("Listening on Port 3000"); });
var express = require('express'); var path = require('path'); var app = express();
global.appRoot = path.resolve(__dirname);
var port = process.env.PORT | 8000;
app.use(express.static(appRoot + '/public/dist'));
app.listen(port, '0.0.0.0', function() { console.log("Listening on Port "+port); });
I have the same issue but not able to fix it Please help me to fix it
It didn't
On Fri, Dec 14, 2018, 9:52 PM MonX94 <notifications@github.com wrote:
Watch out. This doesn't work on a free dyno.
It did.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Naltox/telegram-node-bot/issues/119#issuecomment-447531471, or mute the thread https://github.com/notifications/unsubscribe-auth/AZgoHokQMy7pSdHkyXTq91j1O9svtvVQks5u5GPQgaJpZM4KBiNN .
@vincentaudebert do you know the reason why that doesn't work on free dynos?
When I deploy a Telegram bot built with this module to Heroku, after 60 seconds I get following error:
I couldn't find a way to set a port because there is no
.listen(...)
method when calling the Telegram constructor. Any ideas?