File size: 386 Bytes
3ed8626
0962466
d32ff0b
3ed8626
d32ff0b
3ed8626
0962466
3ed8626
e07821f
d32ff0b
084b2a8
 
 
 
d32ff0b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from fastapi import FastAPI
from fastapi.responses import HTMLResponse
import os

keepalive = FastAPI()

@keepalive.get("/", response_class=HTMLResponse)
def root():
    return "<html><body><p>This is the space for my discord bot (@xcx0902-bot)</p></body></html>"

@keepalive.head("/")
def root_head():
    return "OK"

os.system("python app.py 1>/dev/null 2>/dev/null &")