J
J
jenya77712019-11-15 16:22:09
Node.js
jenya7771, 2019-11-15 16:22:09

How to programmatically run Long Poll in NodeJs?

Hello, I need to poll the server via Long Poll.
How to programmatically make new connections when new tokens appear in the database?

const VkBot = require('node-vk-bot-api')
 
const bot = new VkBot(process.env.TOKEN)
 
bot.command('/start', (ctx) => {
  ctx.reply('Hello!')
})
 
bot.startPolling()

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question