summaryrefslogtreecommitdiffstats
path: root/bitvend.py
blob: 589ad98914d9272acd3dcc05f0093072a5b1ed7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import logging

logging.basicConfig(level=logging.INFO) # noqa

import threading
from bitvend import create_app, dev, proc, db

if __name__ == "__main__":
    from prometheus_client import start_http_server
    start_http_server(8000)

    app = create_app()

    with app.app_context():
        db.create_all()

    threading.Thread(target=app.run, kwargs={
        'host': '0.0.0.0',
        }, daemon=True).start()
    proc.start()
    dev.run()