mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-01 10:09:08 +00:00
26 lines
666 B
Python
26 lines
666 B
Python
import argparse
|
|
import logging
|
|
|
|
import uvicorn
|
|
from dotenv import load_dotenv
|
|
|
|
from app.config.uvicorn import load_uvicorn_config
|
|
|
|
logging.basicConfig(
|
|
level=logging.INFO,
|
|
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
|
datefmt="%Y-%m-%d %H:%M:%S",
|
|
)
|
|
|
|
load_dotenv()
|
|
|
|
if __name__ == "__main__":
|
|
parser = argparse.ArgumentParser(description="Run the SurfSense application")
|
|
parser.add_argument("--reload", action="store_true", help="Enable hot reloading")
|
|
args = parser.parse_args()
|
|
|
|
config_kwargs = load_uvicorn_config(args)
|
|
config = uvicorn.Config(**config_kwargs)
|
|
server = uvicorn.Server(config)
|
|
|
|
server.run()
|