from fastapi import FastAPI
from core.config import settings
from db.session import engine
from db.base_model import Base 


def startup():  #start the project, and create the tables
    app = FastAPI(title=settings.PROJECT_NAME,version=settings.PROJECT_VERSION)
    Base.metadata.create_all(bind=engine)
    return app



app = startup() 

@app.get("/")
def root():
    return {"message": "Hello World!"}

@app.get("/user")
def get_users():
    return {
        {"name": "almaz"},
        {"name": "madi"}
    }