Skip to content

Commit

Permalink
added randomized port selection for production
Browse files Browse the repository at this point in the history
  • Loading branch information
ensaremirerol committed Jan 6, 2025
1 parent 0ee63a0 commit a5615cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import webview
from dotenv import load_dotenv
from kink.container import di
from pydantic import parse_obj_as

from server.logger import setup_logging
Expand Down Expand Up @@ -51,6 +52,8 @@ def get_free_port():

port = 8000 if DEBUG else get_free_port()

di["PORT"] = port


def start_fastapi():
import uvicorn
Expand Down

0 comments on commit a5615cc

Please sign in to comment.