File size: 482 Bytes
2376236
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d16b032
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os
import uvicorn
from apis import api_v1_router
from apis.create_app import create_app
from dotenv import load_dotenv, find_dotenv

# Load environment variables from the `.env` file
load_dotenv(find_dotenv())
# Create FastAPI app instance
app = create_app()


# Add routes
app.include_router(api_v1_router, prefix="/api")


# Launch FastAPI app
if __name__ == "__main__":
    uvicorn.run(app, host="0.0.0.0", port=os.environ.get("PORT", 7860))
    print("Server is running")