27 lines
526 B
Python
27 lines
526 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
"""a"""
|
|
|
|
import os
|
|
from warnings import filterwarnings as filter_warnings
|
|
|
|
from flask import Flask
|
|
|
|
from app import create_app
|
|
|
|
app: Flask = create_app(__name__, os.environ["DB"])
|
|
|
|
|
|
def main() -> int:
|
|
"""entry / main function"""
|
|
|
|
app.run("127.0.0.1", 8080, True)
|
|
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
assert main.__annotations__.get("return") is int, "main() should return an integer"
|
|
|
|
filter_warnings("error", category=Warning)
|
|
raise SystemExit(main())
|