zerotrade / app.py
goldentraderzero's picture
Create app.py
cd7674a verified
raw
history blame contribute delete
250 Bytes
from fastapi import FastAPI
import requests
app = FastAPI()
@app.get("/")
def hello():
return {"health": "running"}
@app.get("/ip")
def get_ip():
ip = requests.get("https://ip4only.me/api/").text.split(",")[1]
return {"server_ip": ip}