from fastapi import FastAPI | |
from tortoise import Tortoise, run_async | |
from .Users.UserRoutes import user_router | |
from .modelInit import TORTOISE_ORM | |
app = FastAPI() | |
async def startup_event(): | |
await Tortoise.init(config=TORTOISE_ORM) | |
await Tortoise.generate_schemas() | |
async def landing_page(): | |
return {"code": 200, "message": "still running"} | |
app.include_router(user_router) | |
async def main(): | |
pass | |
# if __name__ == "__main__": | |
# main() | |
# uvicorn.run(app, host="0.0.0.0", port=8000) | |