Skip to content

Commit

Permalink
Merge pull request #13 from msoedov/app_arg
Browse files Browse the repository at this point in the history
feat(Pass optional app to create_service):
  • Loading branch information
msoedov authored May 10, 2023
2 parents a3d4891 + 4e9b382 commit 85313e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions langcorn/server/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ async def handler(request: request_cls, http_request: Request):
return handler


def create_service(*lc_apps, auth_token: str = ""):
def create_service(*lc_apps, auth_token: str = "", app: FastAPI = None):
# Make local modules discoverable
sys.path.append(os.path.dirname(__file__))
logger.info("Creating service")
app = FastAPI()
app = app or FastAPI()
endpoints = ["/docs"]

_authenticate_or_401 = Depends(authenticate_or_401(auth_token=auth_token))
Expand Down

1 comment on commit 85313e8

@vercel
Copy link

@vercel vercel bot commented on 85313e8 May 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

langcorn – ./

langcorn.vercel.app
langcorn-msoedov.vercel.app
langcorn-git-main-msoedov.vercel.app

Please sign in to comment.