-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.py
More file actions
27 lines (18 loc) · 672 Bytes
/
app.py
File metadata and controls
27 lines (18 loc) · 672 Bytes
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
27
"""PT-BR: Ponto de entrada fino da aplicacao Flask.
EN: Thin entry point for the Flask application.
"""
from __future__ import annotations
import sys
from src.app_factory import create_app, print_startup_banner
from src.config import HOST, PORT
app = create_app()
def main() -> None:
"""PT-BR: Inicializa codificacao no Windows, imprime banner e sobe o servidor.
EN: Initialize Windows encoding, print the banner, and start the server.
"""
if sys.platform == "win32":
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
print_startup_banner()
app.run(debug=False, host=HOST, port=PORT)
if __name__ == "__main__":
main()