I
I
Innokenty Ivanov2018-02-17 17:33:46
JavaScript
Innokenty Ivanov, 2018-02-17 17:33:46

How to test a Telegram bot written in NodeJS?

I am writing a bot in NodeJS. I uploaded it to Heroku, but either the server lags, or I wrote the code badly - the bot is dumb with answers and does not always respond, and after deploying a new version of the solution, the bot seems to work for 5 seconds, then groans.
How to test/debug a bot in some "emulator"?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2018-02-17
@Kenya-West

JetBrains WebStorm, run the bot there in the console, and use it in telegram while WebStorm is running. Is Worker included in Heroku?

S
Sergey, 2018-02-18
@SaXXuM

I recommend ngrok for pushing https to your localhost where the bot is running locally - it's very convenient to debug. If you go even further, then get yourself a separate bot for testing, in a dev environment, the server clings to this bot, and when you deploy it to production, then to the real one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question