You've already forked Promocode-API
mirror of
https://github.com/devitq/Promocode-API.git
synced 2026-06-10 06:52:34 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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))
|
||||
Reference in New Issue
Block a user