-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
27 lines (22 loc) · 657 Bytes
/
Copy pathrun.py
File metadata and controls
27 lines (22 loc) · 657 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
import uvicorn
import os
import sqlite3
from app.database.db_manager import init_db
from app.config import settings
def main() -> None:
"""
Entry point do sistema PRISM. Inicializa o DB e sobe o servidor FastAPI.
"""
print("Iniciando setup do PRISM...")
# Initialize the local database schema
init_db()
print("Banco de dados local prism_workforce.db garantido com sucesso.")
print(f"Iniciando PRISM v{settings.version} na porta {settings.port}...")
uvicorn.run(
"app.main:app",
host="0.0.0.0",
port=settings.port,
reload=settings.debug
)
if __name__ == "__main__":
main()