Files
The_DisExcel_project/main.py
T
2026-08-12 18:36:56 +03:00

36 lines
846 B
Python

from pathlib import Path
import uvicorn
from fastapi import FastAPI
from src.web.protected_routes.auth_routes import router as protected_router
from src.web.protected_routes.protected_user_action_routes import (
router as protected_user_action_routes,
)
app=FastAPI(root_path="/")
app.include_router(router=protected_router)
app.include_router(router=protected_user_action_routes)
@app.get("")
async def root()->dict:
return {"root":"hello, this is root"}
def create_dirs():
dirs_to_create=("./DB",
"./upload",
"./upload_bad",
"./upload_finished")
for x in dirs_to_create:
Path(x).mkdir(parents=True, exist_ok=True)
def main():
create_dirs()
uvicorn.run("main:app", host="0.0.0.0", reload=True)
if __name__=="__main__":
main()