o
    ng]                     @   sZ  d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZ d dlmZ d dlZd d	lmZ d dlZd dlZejd
dd e Zejje	d edddej dej dej ddZejrxejedd ejD ddgdgd ejeejd ejdedddd eddd  Zed!krd dl Z e!d" e j"ed#d$d% dS dS )&    )FastAPI)CORSMiddleware)
api_router)settings)engine)Base)setup_loggingN)StaticFilesZlogsT)exist_ok)bindzAdimsayer APIzAdimsayer Backend APIz1.0.0z/openapi.jsonz/docsz/redoc)titledescriptionversionZopenapi_urlZdocs_urlZ	redoc_urlc                 C   s   g | ]}t |qS  )str).0originr   r   /app/app/main.py
<listcomp>%   s    r   *)Zallow_originsZallow_credentialsZallow_methodsZallow_headers)prefixz/uploadsZuploads)	directory)name/c                      s   t d ddiS )NzRoot endpoint accessedmessagezWelcome to Adimsayer API)loggerinfor   r   r   r   root1   s   
r   __main__zStarting Adimsayer API serverz0.0.0.0i@  )hostport)#Zfastapir   Zfastapi.middleware.corsr   Zapp.api.v1.apir   Zapp.core.configr   Zapp.db.sessionr   Zapp.db.baser   Zapp.core.logging_configr   osZfastapi.staticfilesr	   Zapp.models.userappZapp.models.password_resetmakedirsr   metadataZ
create_allZ
API_V1_STRZBACKEND_CORS_ORIGINSZadd_middlewareZinclude_routerZmountgetr   __name__uvicornr   runr   r   r   r   <module>   sN    



	

