Skip to content

Commit a879a58

Browse files
committed
2 parents 23e9678 + a687fd8 commit a879a58

File tree

5 files changed

+1125
-27
lines changed

5 files changed

+1125
-27
lines changed

app/__init__.py

Whitespace-only changes.

app/main.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from fastapi import FastAPI
2+
from fastapi.middleware.cors import CORSMiddleware
3+
import psycopg
4+
5+
app = FastAPI()
6+
7+
# Disable CORS. Do not remove this for full-stack development.
8+
app.add_middleware(
9+
CORSMiddleware,
10+
allow_origins=["*"], # Allows all origins
11+
allow_credentials=True,
12+
allow_methods=["*"], # Allows all methods
13+
allow_headers=["*"], # Allows all headers
14+
)
15+
16+
@app.get("/healthz")
17+
async def healthz():
18+
return {"status": "ok"}

0 commit comments

Comments
 (0)