-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
26 lines (19 loc) · 782 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""
A simple, basic FastAPI web application for creating bracket's for best item tournaments
First iteration will only be for songs only.
Many comments to explain what code is doing, this web app is for beginners to reference
"""
from dotenv import load_dotenv
# Load env variables
load_dotenv()
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from routes import index, account, bracket
# Create the FastAPI app
app = FastAPI(docs_url=None, redoc_url=None)
# Include the CSS/JS in static by mounting to the app
app.mount('/static', StaticFiles(directory='static'), name='static')
# Include the routers for the routes, make sure to import the files
app.include_router(index.router)
app.include_router(account.router)
app.include_router(bracket.router)