File size: 320 Bytes
feca41c
988d6d5
feca41c
 
 
0e3d371
 
 
 
 
 
 
 
 
feca41c
dbd3028
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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"}
    
@app.get("/api/python")
def hello_python():
    return {"message": "Hello Python"}