You've already forked Promocode-API
mirror of
https://github.com/devitq/Promocode-API.git
synced 2026-06-10 04:32:35 +00:00
15 lines
317 B
Python
15 lines
317 B
Python
import os
|
|
from fastapi import FastAPI
|
|
import uvicorn
|
|
|
|
app = FastAPI()
|
|
|
|
@app.get("/api/ping")
|
|
def send():
|
|
return {"status": "ok"}
|
|
|
|
if __name__ == "__main__":
|
|
server_address = os.getenv("SERVER_ADDRESS", "0.0.0.0:8080")
|
|
host, port = server_address.split(":")
|
|
uvicorn.run(app, host=host, port=int(port))
|