Answers for "webserver.py discord bot"

0

webserver.py discord bot

from flask import Flask
from threading import Thread

app = Flask('')

@app.route('/')
def home():
    return "Hello. I am alive!"

def run():
  app.run(host='0.0.0.0',port=8080)

def keep_alive():
    t = Thread(target=run)
    t.start()
Posted by: Guest on July-31-2021

Python Answers by Framework

Browse Popular Code Answers by Language