-
Notifications
You must be signed in to change notification settings - Fork 1
/
keep_alive.py
26 lines (21 loc) · 1017 Bytes
/
keep_alive.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#***************************************************************************#
# #
# MCDramaBot - A Discord Bot That Causes Drama #
# https://github.com/CrankySupertoon/MCDramaBot #
# Copyright (C) 22020 CrankySupertoon. All rights reserved. #
# #
# License: #
# MIT License https://www.mit.edu/~amini/LICENSE.md #
# #
#***************************************************************************#
from flask import Flask
from threading import Thread
app = Flask('')
@app.route('/')
def home():
return "I am not dead."
def run():
app.run(host='0.0.0.0',port=8080)
def keep_alive():
t = Thread(target=run)
t.start()