fastapi-demo / main.py
aikenml's picture
Update main.py
4352c00
raw
history blame
398 Bytes
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI()
app.add_middleware(
CORSMiddleware,
allow_origins=['*']
)
@app.get("/")
def read_root():
return {"message": "Hello World World World World"}
@app.get("/api/python")
def hello_python():
# return {"message": "Hello Python"}
for i in range(10000):
print(i, end=" ")