Created
December 26, 2021 17:51
-
-
Save agusrichard/2525abc25a3488c626d158bbce8730a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uvicorn | |
from fastapi import FastAPI | |
from app.internal.db import initialize_db | |
from app.domain.recipes import RecipesDomain | |
from app.repository.recipes import RecipesRepository | |
from app.routers.recipes import RecipesRouter | |
app = FastAPI() | |
db = initialize_db() | |
recipes_repository = RecipesRepository(db) | |
recipes_domain = RecipesDomain(recipes_repository) | |
recipes_router = RecipesRouter(recipes_domain) | |
app.include_router(recipes_router.router) | |
@app.get('/') | |
def index(): | |
return 'Hello World!' | |
if __name__ == '__main__': | |
uvicorn.run("app.main:app", host="0.0.0.0", port=5000, log_level="info", reload=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment