26 lines
No EOL
520 B
Python
26 lines
No EOL
520 B
Python
import logging
|
|
import threading
|
|
import time
|
|
import requests
|
|
from datetime import datetime
|
|
from fastapi import FastAPI
|
|
from starlette.middleware.cors import CORSMiddleware
|
|
|
|
from app.routes import router
|
|
|
|
logging.basicConfig(
|
|
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO
|
|
)
|
|
|
|
|
|
app = FastAPI()
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=['*'],
|
|
allow_credentials=True,
|
|
allow_methods=['*'],
|
|
allow_headers=['*'],
|
|
)
|
|
app.include_router(router)
|
|
|
|
__all__ = ['app'] |