blob: b22b3cd2d0b8c634748a2ba5c4c32f4e0b8675f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# UGE / L2 / Intro to relational databases / Python project prototype
# Author: Pacien TRAN-GIRARD
# Licence: EUPL-1.2
from fastapi import FastAPI, status
from fastapi.staticfiles import StaticFiles
import app_sessions
import app_account
import app_wallet
main = FastAPI()
# Add sessions based on signed cookies.
main.add_middleware(app_sessions.SessionManager)
# Register our request handlers
main.include_router(app_account.router)
main.include_router(app_wallet.router)
# Handler for static resource files (CSS, JS, ...)
main.mount('/', StaticFiles(directory='./static/'), name='static')
|