mirror of
https://ak-git.vectorsigma.ru/terghalin/metalcheck.git
synced 2026-03-21 07:38:57 +09:00
28 lines
617 B
Python
28 lines
617 B
Python
from fastapi import FastAPI
|
|
from database import init_db
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
from routes import metal, vm, k8s, export, think
|
|
|
|
app = FastAPI()
|
|
|
|
init_db()
|
|
|
|
# Include routes
|
|
app.include_router(metal.router)
|
|
app.include_router(vm.router)
|
|
app.include_router(k8s.router)
|
|
app.include_router(export.router)
|
|
app.include_router(think.router)
|
|
|
|
#app.add_middleware(
|
|
# CORSMiddleware,
|
|
# allow_origins=["http://localhost:3000"],
|
|
# allow_credentials=True,
|
|
# allow_methods=["*"],
|
|
# allow_headers=["*"],
|
|
#)
|
|
|
|
@app.get("/")
|
|
def root():
|
|
return {"message": "Welcome to Metal Check API"}
|