-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
from contextlib import asynccontextmanager | ||
|
||
from fastapi import FastAPI | ||
from sqlalchemy.ext.asyncio import AsyncSession | ||
from sqlalchemy import select | ||
|
||
from app.core.database import sessionmanager | ||
from app.core.settings import settings | ||
from app.routes.v1 import routers | ||
from app.models import User | ||
from app.models.models_enums import UserRoles | ||
from app.core.security import get_password_hash | ||
|
||
|
||
def init_app(init_db=True): | ||
|
@@ -21,13 +26,13 @@ async def lifespan(app: FastAPI): | |
|
||
app = FastAPI( | ||
title="CV-Api", | ||
description="CV Managment Web api with basic auth crud built by @GabrielCarvalho to my girlfriend", | ||
description="CV Management Web API with basic auth CRUD built by @GabrielCarvalho for my girlfriend", | ||
contact={ | ||
"name": "Gabriel Carvalho", | ||
"url": "https://www.linkedin.com/in/gabzsz/", | ||
"email": "[email protected]", | ||
}, | ||
summary="WebApi build on best market practices such as TDD, Clean Arch, Data Validation with Pydantic V2", | ||
summary="WebAPI built on best market practices such as TDD, Clean Architecture, Data Validation with Pydantic V2", | ||
lifespan=lifespan, | ||
) | ||
app.include_router(routers) | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
# applicate the migrations | ||
alembic upgrade head | ||
|
||
# run server | ||
uvicorn --host 0.0.0.0 --port 8000 app.main:app |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[tool.poetry] | ||
name = "corpsystem-test" | ||
name = "authservice" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["GabrielCarvalho <[email protected]>"] | ||
|