title: Python Flask app (Telegram Bot) on Heroku not running
body: <p>I am using Heroku to host a Telegram Bot script in python using Flask.
  I've gone through the process of setting everything up, including the git, the virtual enviroment ( <code>#py -m venv env</code> + <code>#env\Scripts\activate</code> and the script... It gives no errors but it doesn't run...
  I've installed Flask and Gunicorn in the env:</p>
  
  <pre><code>#pip install flask
  #set FLASK_APP=app.py
  #pip install gunicorn
  </code></pre>
  
  <p>FILES IN THE PROJECT:</p>
  
  <p>.gitignore  -></p>
  
  <p><code>env</code></p>
  
  <p>Procfile -></p>
  
  <p><code>web: gunicorn deploy:app</code></p>
  
  <p>deploy.py -></p>
  
  <pre><code>import os
  
  from flask import Flask, request
  
  import telebot
  
  TOKEN = 'My token here'
  bot = telebot.TeleBot(TOKEN)
  app = Flask(__name__)
  
  
  @bot.message_handler(commands=['start'])
  def start(message):
      bot.reply_to(message, 'Hello, ' + message.from_user.first_name)
  
  
  @bot.message_handler(func=lambda message: True, content_types=['text'])
  def echo_message(message):
      bot.reply_to(message, message.text)
  
  
  @app.route('/' + TOKEN, methods=['POST'])
  def getMessage():
      bot.process_new_updates([telebot.types.Update.de_json(request.stream.read().decode("utf-8"))])
      return "!", 200
  
  
  @app.route("/")
  def webhook():
      bot.remove_webhook()
      bot.set_webhook(url='My Url here' + TOKEN)
      return "!", 200
  
  
  if __name__ == "__main__":
      app.run(host="0.0.0.0", port=int(os.environ.get('PORT', 5000)))
  </code></pre>