V
V
VasHan2020-07-01 17:59:48
Python
VasHan, 2020-07-01 17:59:48

How to combine flask and aiogram apps?

Good afternoon!

I have a telegram bot written using the aiogram library and working through a webhook, and I also have a FLASK application that accepts POST requests, parses and sends to the telegram chat using the telegram bot api.

I need to combine these two applications into one. But I ran into a problem, because. these are two different web servers, it is impossible to start and call the function of another application at the same time. Can you please tell me how or with what you can organize this?

The webhook bot is launched as a web server on iohttp, it is possible to somehow receive POST requests and process them using this web server, but I don’t understand how to run it in one thread.

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