1
0
mirror of https://gitlab.com/2-chainz/2chainz.git synced 2025-07-26 08:11:22 +00:00

Accidentally didn't push this stuff and deleted it last night lol

This commit is contained in:
2025-05-23 12:02:31 -06:00
parent 9725f84268
commit e488f979c1
3 changed files with 81 additions and 14 deletions

View File

@@ -0,0 +1,22 @@
import time
from datetime import datetime
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
app = FastAPI()
start_time = time.time()
@app.get("/api/")
async def ping():
return {
"status": "ok",
"timestamp": datetime.now().isoformat(),
"uptime_seconds": round(time.time() - start_time, 2),
}
# Mount static files
app.mount("/", StaticFiles(directory="website", html=True), name="static")