14 lines
239 B
Python
14 lines
239 B
Python
from fastapi import FastAPI
|
|
import uvicorn
|
|
|
|
app=FastAPI(root_path="/")
|
|
|
|
@app.get("")
|
|
def root()->dict:
|
|
return {"root":"hello, this is root"}
|
|
|
|
def main():
|
|
uvicorn.run("main:app", reload=True)
|
|
|
|
if __name__=="__main__":
|
|
main() |