Create main.py
Browse files
main.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from fastapi import FastAPI
|
2 |
+
from fastapi.middleware.cors import CORSMiddleware
|
3 |
+
from app.routes import auth, main # Import your route-related modules
|
4 |
+
|
5 |
+
app = FastAPI()
|
6 |
+
|
7 |
+
# CORS configuration, error handlers, and other global settings
|
8 |
+
app.add_middleware(CORSMiddleware, allow_origins=["*"])
|
9 |
+
|
10 |
+
# Include route-related modules
|
11 |
+
app.include_router(auth.router)
|
12 |
+
app.include_router(main.router)
|