mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: new run method & add local dev setup
This commit is contained in:
parent
67c18a2d1e
commit
24be39f7e3
6 changed files with 27 additions and 6 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import uvicorn
|
||||
from fastapi import FastAPI, Request
|
||||
from config.config import LearnHouseConfig, get_learnhouse_config
|
||||
from src.core.events.events import shutdown_app, startup_app
|
||||
|
|
@ -60,6 +61,15 @@ app.mount("/content", StaticFiles(directory="content"), name="content")
|
|||
app.include_router(v1_router)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
uvicorn.run(
|
||||
"app:app",
|
||||
host="0.0.0.0",
|
||||
port=learnhouse_config.hosting_config.port,
|
||||
reload=learnhouse_config.general_config.development_mode,
|
||||
)
|
||||
|
||||
|
||||
# General Routes
|
||||
@app.get("/")
|
||||
async def root():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue